-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.15 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish
on:
push:
tags:
- v*
jobs:
bump-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Toolchain
run: rustup toolchain uninstall stable && rustup toolchain install beta -c rustfmt,clippy && rustup override set beta
- name: Bump version
run: 'cargo install vproj && vproj ${GITHUB_REF##*/} && git add . && git -c user.name="AlseinX" -c user.email="[email protected]" commit -am "chore: bump release version ${GITHUB_REF##*/}"'
- name: Run cargo fmt
run: cargo fmt --check --verbose
- name: Run cargo clippy
run: cargo clippy --verbose --features full
- name: Run tests
run: cargo test --verbose --features full
- name: Publish
id: publish-crates
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish Result
if: fromJSON(steps.publish-crates.outputs.published).*
run: |
LIST="${{ join(fromJSON(steps.publish-crates.outputs.published).*.name, ', ') }}"
echo "Published crates: $LIST"