Skip to content

Commit 56cdd06

Browse files
committed
Use gh CLI for release
1 parent 60e6ca7 commit 56cdd06

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,18 @@ on:
1717
jobs:
1818
build:
1919
runs-on: ubuntu-20.04
20+
permissions:
21+
id-token: write # Enable OIDC
22+
pull-requests: write
23+
contents: write
2024

2125
steps:
2226
-
2327
name: Checkout code
2428
uses: actions/[email protected]
2529

30+
- uses: chainguard-dev/actions/setup-gitsign@main
31+
2632
-
2733
uses: actions/[email protected]
2834
with:
@@ -47,8 +53,7 @@ jobs:
4753
4854
- name: Setup git
4955
run: |
50-
git config user.name "GitHub Actions Bot"
51-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+
git config --global tag.gpgsign true
5257
5358
-
5459
name: Build
@@ -57,13 +62,12 @@ jobs:
5762
git add -A dist
5863
5964
- name: Publish
65+
env:
66+
GH_TOKEN: ${{ github.token }}
6067
run: |
6168
npm version ${{ github.event.inputs.version }} --no-git-tag-version
6269
VERSION=$(node -p "require('./package.json').version")
6370
git commit -m "release: $VERSION" -a
64-
git tag "$VERSION" -m "release: $VERSION"
65-
git push --follow-tags
71+
git push
6672
67-
-
68-
name: GitHub Release
69-
uses: softprops/[email protected]
73+
gh release create $VERSION --generate-notes

0 commit comments

Comments
 (0)