File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: publish
22
33on :
44 workflow_dispatch :
5+ push :
6+ branches :
7+ - main
58
69jobs :
710 publish_gh_packages :
3336 run : pnpm publish --access restricted
3437 env :
3538 NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36-
37- release :
38- needs : publish_gh_packages
39- runs-on : ubuntu-latest
40-
41- permissions :
42- contents : write # publish a GitHub release
43- issues : write # comment on released issues
44- pull-requests : write # comment on released pull requests
45-
46- steps :
47- - uses : actions/checkout@v4
48- with :
49- fetch-depth : 0
50-
51- - uses : actions/setup-node@v4
52- with :
53- node-version : " lts/*"
54-
55- - name : semantic-release
56- run : npx semantic-release@24
57- env :
58- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -2,9 +2,18 @@ name: release
22
33on :
44 workflow_dispatch :
5+ workflow_run :
6+ workflows :
7+ - publish
8+ types :
9+ - completed
510
611jobs :
712 release :
13+ # Run on manual dispatch OR when the `publish` workflow completes successfully.
14+ # When triggered by workflow_run, `github.event.workflow_run.conclusion` is set.
15+ # Keep manual dispatch available as well.
16+ if : " ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}"
817 runs-on : ubuntu-latest
918
1019 permissions :
2029 - uses : actions/setup-node@v4
2130 with :
2231 node-version : " lts/*"
32+ - name : Read package version
33+ id : pkg
34+ run : echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT
2335
24- - name : semantic-release
25- run : npx semantic-release@24
36+ - name : Create tag from package.json version
37+ env :
38+ VERSION : ${{ steps.pkg.outputs.version }}
39+ run : |
40+ set -e
41+ TAG="v${VERSION}"
42+ if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then
43+ echo "Tag $TAG already exists on remote."
44+ else
45+ git config user.name "github-actions[bot]"
46+ git config user.email "github-actions[bot]@users.noreply.github.com"
47+ git tag -a "$TAG" -m "Release $TAG"
48+ git push origin "$TAG"
49+ fi
50+
51+ - name : Create GitHub release
52+ uses : softprops/action-gh-release@v2
53+ with :
54+ tag_name : v${{ steps.pkg.outputs.version }}
55+ name : Release v${{ steps.pkg.outputs.version }}
56+ generate_release_notes : true
2657 env :
2758 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11[package ]
22name = " tauri-plugin-keystore"
3- version = " 2.2.0 "
3+ version = " 2.3.1 "
44authors = [" 0x330a" ]
55description = " Interact with the device-native key storage (Android Keystore, iOS Keychain) & perform ecdh operations for generating symmetric keys"
66edition = " 2021"
You can’t perform that action at this time.
0 commit comments