Skip to content

Commit c4e2d79

Browse files
committed
Authenticate for github cli
1 parent 81f8c29 commit c4e2d79

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
name: Release new version
2626
runs-on: ubuntu-latest
2727
outputs:
28-
new_tag: ${{ steps.bump_verson.outputs.tag }}
28+
new_tag: ${{ steps.bump_version.outputs.NEW_TAG }}
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2931
steps:
3032
- uses: actions/checkout@v4
3133
- uses: actions/setup-node@v4
@@ -34,12 +36,18 @@ jobs:
3436
registry-url: 'https://registry.npmjs.org'
3537
- run: npm ci
3638
- run: npm run build
37-
- id: bump_verson
38-
run: npm version ${{ inputs.version }} >> "$GITHUB_OUTPUT"
39+
- run: |
40+
git config user.name "github-actions[bot]"
41+
git config user.email "41898282+github-actions[bot]@users.noreply.github"
42+
- id: bump_version
43+
run: echo "NEW_TAG=$(npm version ${{ inputs.version }})" >> $GITHUB_OUTPUT
3944
- run: git push --follow-tags
4045
github_release:
4146
name: Create a release
4247
runs-on: ubuntu-latest
4348
needs: release
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4451
steps:
52+
- uses: actions/checkout@v4
4553
- run: gh release create ${{ needs.release.outputs.new_tag }} --draft --verify-tag

0 commit comments

Comments
 (0)