File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : PublishDryRun
2
+
3
+ on :
4
+ workflow_dispatch
5
+
6
+ env :
7
+ rust_toolchain : stable
8
+
9
+ jobs :
10
+ publishdryrun :
11
+ name : Publish Dry Run
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Setup | Checkout
15
+ uses : actions/checkout@v2
16
+ - name : Setup | Rust
17
+ uses : actions-rs/toolchain@v1
18
+ with :
19
+ toolchain : ${{ env.rust_toolchain }}
20
+ - name : Setup | Set toolchain
21
+ run : rustup default ${{ env.rust_toolchain }}
22
+ - name : Build | Publish Dry Run
23
+ run : cargo publish --dry-run
Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ workflow_dispatch
5
+
6
+ env :
7
+ rust_toolchain : stable
8
+ CRATE_NAME : async-io-mini
9
+
10
+ jobs :
11
+ publish :
12
+ name : Publish
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Setup | Checkout
16
+ uses : actions/checkout@v2
17
+ - name : Setup | Rust
18
+ uses : actions-rs/toolchain@v1
19
+ with :
20
+ toolchain : ${{ env.rust_toolchain }}
21
+ - name : Setup | Set toolchain
22
+ run : rustup default ${{ env.rust_toolchain }}
23
+ - name : Login
24
+ run : cargo login ${{ secrets.crates_io_token }}
25
+ - name : Build | Publish
26
+ run : cargo publish
27
+ - name : Get the crate version from cargo
28
+ run : |
29
+ version=$(cargo metadata --format-version=1 --no-deps | jq -r ".packages[] | select(.name == \"${{env.CRATE_NAME}}\") | .version")
30
+ echo "crate_version=$version" >> $GITHUB_ENV
31
+ echo "${{env.CRATE_NAME}} version: $version"
32
+ - name : Tag the new release
33
+ uses : rickstaa/action-create-tag@v1
34
+ with :
35
+ tag : v${{env.crate_version}}
36
+ message : " Release v${{env.crate_version}}"
You can’t perform that action at this time.
0 commit comments