File tree Expand file tree Collapse file tree 3 files changed +55
-23
lines changed Expand file tree Collapse file tree 3 files changed +55
-23
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Release Notes
33on :
44 push :
55 tags :
6- - ' * '
6+ - " * "
77
88jobs :
99 notes :
1212 - uses : actions/checkout@v4
1313 with :
1414 fetch-depth : 0
15- - name : Get Previous Tag
16- run : |
17- PREVIOUS_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))
18- echo ${PREVIOUS_TAG}
19- echo "previous_tag=${PREVIOUS_TAG}" >> $GITHUB_ENV
20- - name : Get New Tag
21- run : |
22- NEW_TAG=${GITHUB_REF#refs/tags/}
23- echo ${NEW_TAG}
24- echo "new_tag=${NEW_TAG}" >> $GITHUB_ENV
2515 - uses : actions/setup-node@v4
26- - name : Generate Release Notes
27- id : notes
28- run : |
29- NOTES=$(npx generate-github-release-notes jrjohnson ember-cli-image-transformer ${{ env.previous_tag }} ${{env.new_tag}})
30- echo ${NOTES}
31- # remove line breaks from notes so they can be passed around
32- NOTES="${NOTES//$'\n'/'%0A'}"
33- echo "release_notes=${NOTES}" >> $GITHUB_ENV
3416 - uses : ncipollo/release-action@v1
3517 with :
36- body : ${{env.release_notes}}
3718 token : ${{ secrets.MY_TOKEN }}
19+ generateReleaseNotes : true
Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 releaseType :
7- description : ' Semver Release Type (major,minor,patch)'
7+ description : " Semver Release Type (major,minor,patch)"
88 required : true
9+ default : " patch"
10+ type : choice
11+ options :
12+ - patch
13+ - minor
14+ - major
915
1016jobs :
1117 tag :
@@ -14,13 +20,13 @@ jobs:
1420 - uses : actions/checkout@v4
1521 with :
1622 token : ${{ secrets.MY_TOKEN }}
23+ - uses : pnpm/action-setup@v4
1724 - name : Validate releaseType
18- run : npx in-string-list ${{ github.event.inputs.releaseType }} major,minor,patch
25+ run : pnpx in-string-list ${{ github.event.inputs.releaseType }} major,minor,patch
1926 - name : Setup Git
2027 run : |
2128 git config --global user.name "Jonathan Johnson"
2229 git config --global user.email "jon.johnson@ucsf.edu"
23- - uses : pnpm/action-setup@v4
2430 - name : Increment Version
2531 run : pnpm version ${{ github.event.inputs.releaseType }}
2632 - name : Push Changes
Original file line number Diff line number Diff line change 1+ name : Update pnpm Version
2+ on :
3+ schedule :
4+ - cron : " 0 5 * * 6" # Weekly on Saturday night (UTC)
5+ workflow_dispatch :
6+
7+ jobs :
8+ update-pnpm :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - name : Setup Node.js
13+ uses : actions/setup-node@v4
14+ with :
15+ node-version : 18
16+ - name : Get latest pnpm version
17+ run : |
18+ PNPM_VERSION="$(npm view pnpm version)" # get the latest version of pnpm from the registry
19+ echo ${PNPM_VERSION}
20+ echo "pnpm_version=${PNPM_VERSION}" >> $GITHUB_ENV
21+ - name : Update package.json
22+ run : |
23+ jq '.packageManager = "pnpm@'"${{ env.pnpm_version }}"'"' package.json > temp.json
24+ mv temp.json package.json
25+ - name : Create Pull Request
26+ id : cpr
27+ uses : peter-evans/create-pull-request@v7
28+ with :
29+ token : ${{ secrets.MY_TOKEN }}
30+ commit-message : Update PNPM to v${{ env.pnpm_version }}
31+ title : Update PNPM to v${{ env.pnpm_version }}
32+ body : |
33+ Update PNPM to v${{ env.pnpm_version }} the latest release.
34+ Auto-generated by [create-pull-request][1]
35+
36+ [1]: https://github.com/peter-evans/create-pull-request
37+ branch : update-pnpm-version
38+ labels : dependencies
39+ - name : Enable Pull Request Automerge and Label for Tests
40+ if : steps.cpr.outputs.pull-request-operation == 'created'
41+ run : |
42+ gh pr merge --merge --auto ${{ steps.cpr.outputs.pull-request-number }}
43+ env :
44+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments