File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish :
9+ name : Publish
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ id-token : write
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v6
19+
20+ - name : Set up Rust toolchain
21+ uses : actions-rust-lang/setup-rust-toolchain@v1
22+ with :
23+ target : wasm32-unknown-unknown
24+
25+ - name : Install Cargo Binary Install
26+ uses : cargo-bins/cargo-binstall@main
27+
28+ - name : Install crates
29+ run : cargo binstall --force -y cargo-workspaces
30+
31+ - uses : rust-lang/crates-io-auth-action@v1
32+ id : auth
33+
34+ - name : Publish
35+ run : cargo workspaces publish --publish-as-is
36+ env :
37+ CARGO_REGISTRY_TOKEN : ${{ steps.auth.outputs.token }}
Original file line number Diff line number Diff line change 5353 run : git add .
5454
5555 - name : Commit
56+ id : commit
5657 uses : dsanders11/github-app-commit-action@v1
5758 with :
5859 message : ${{ steps.extract-version.outputs.VERSION }}
@@ -62,11 +63,18 @@ jobs:
6263 run : git reset --hard && git pull
6364
6465 - name : Tag
65- uses : bruno-fs/repo-tagger@1.0.0
66- with :
67- tag : ${{ steps.extract-version.outputs.VERSION }}
66+ uses : actions/github-script@v8
6867 env :
69- GITHUB_TOKEN : ${{ steps.app-token.outputs.token }}
68+ GIT_TAG : ${{ steps.extract-version.outputs.VERSION }}
69+ GIT_SHA : ${{ steps.commit.outputs.sha }}
70+ with :
71+ script : |
72+ github.rest.git.createRef({
73+ owner: context.repo.owner,
74+ repo: context.repo.repo,
75+ ref: `refs/tags/${process.env.GIT_TAG}`,
76+ sha: process.env.GIT_SHA
77+ })
7078
7179 - name : Release
7280 uses : softprops/action-gh-release@v2
7583 make_latest : true
7684 tag_name : ${{ steps.extract-version.outputs.VERSION }}
7785 token : ${{ steps.app-token.outputs.token }}
78-
79- - name : Publish
80- run : cargo workspaces publish --publish-as-is --token "${{ secrets.CRATES_IO_TOKEN }}"
You can’t perform that action at this time.
0 commit comments