Skip to content

Commit b0ece4c

Browse files
authored
Merge pull request #2 from RedisJSON/gkorland-publish
Create cratesio-publish.yml
2 parents 1a4f4af + e7f547d commit b0ece4c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Cratesio Publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions-rs/toolchain@v1
13+
with:
14+
toolchain: stable
15+
override: true
16+
17+
- name: get version from tag
18+
id: get_version
19+
run: |
20+
realversion="${GITHUB_REF/refs\/tags\//}"
21+
realversion="${realversion//v/}"
22+
echo "::set-output name=VERSION::$realversion"
23+
24+
- name: Set the version for publishing
25+
uses: ciiiii/[email protected]
26+
with:
27+
file: "Cargo.toml"
28+
key: "package.version"
29+
value: "${{ steps.get_version.outputs.VERSION }}"
30+
31+
- uses: katyo/publish-crates@v1
32+
with:
33+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
34+
args: --allow-dirty

0 commit comments

Comments
 (0)