1515 - patch
1616 - minor
1717 - major
18- # release_notes:
19- # type: string
20- # description: "Release notes"
21- # required: true
2218
2319jobs :
2420 release :
2521 runs-on : ubuntu-latest
2622 steps :
27- # - name: Generate token
28- # id: generate_token
29- # uses: tibdex/github-app-token@v1
30- # with:
31- # app_id: ${{ secrets.WORKFLOWS_GITHUB_APP_ID }}
32- # private_key: ${{ secrets.WORKFLOWS_GITHUB_APP_PRIVATE_KEY }}
23+ - uses : actions/create-github-app-token@v2
24+ id : app-token
25+ with :
26+ app-id : ${{ secrets.WORKFLOWS_GITHUB_APP_ID }}
27+ private-key : ${{ secrets.WORKFLOWS_GITHUB_APP_PRIVATE_KEY }}
3328
3429 - name : Checkout code
35- uses : actions/checkout@v3
36- # with:
37- # token: ${{ steps.generate_token .outputs.token }}
30+ uses : actions/checkout@v4
31+ with :
32+ token : ${{ steps.app-token .outputs.token }}
3833
3934 - name : Set up Deno
4035 uses : denoland/setup-deno@v2
@@ -45,24 +40,28 @@ jobs:
4540 run : |
4641 deno task compile:all
4742
48- - name : Bump version
43+ - name : Get new version and bump deno.json
4944 id : bump_version
5045 run : |
5146 VERSION=$(deno run -A scripts/bump_version.ts ${{ inputs.release_type }})
5247 echo "release_version=$VERSION" >> $GITHUB_OUTPUT
5348
5449 - name : Create release
55- uses : softprops/action-gh-release@v1
50+ uses : softprops/action-gh-release@v2
5651 with :
5752 tag_name : v${{ steps.bump_version.outputs.release_version }}
5853 files : |
5954 dist/*
6055
61- - name : Commit and push changes
56+ - name : Configure git
6257 run : |
63- # Commit and push changes
6458 git config --global user.name "github-action"
6559 git config --global user.email "github-action@nanoapi.io"
66- git add deno.json
67- git commit -m "[skip ci] update version ${{ steps.bump_version.outputs.release_version }}"
60+
61+ - name : Commit changes
62+ run : |
63+ git commit deno.json -m "[skip ci] update version ${{ steps.bump_version.outputs.release_version }}"
64+
65+ - name : Push changes
66+ run : |
6867 git push
0 commit comments