-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 1.19 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Publish
on:
workflow_run:
branches:
- main
workflows:
- Tests & Checks
types:
completed
workflow_dispatch:
permissions:
contents: write
checks: write
statuses: write
jobs:
publish:
name: Publish
runs-on: ${{ matrix.os }}
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
os:
- ubuntu-latest
toolchain:
- stable
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
show-progress: false
- name: Set up Rust toolchain
uses: Systemcluster/actions@setup-rust-v0
with:
channel: ${{ matrix.toolchain }}
cache-key-job: true
- name: Run tests
run: cargo test --workspace --all-features
- name: Publish
uses: Systemcluster/actions@release-crates-v0
if: github.ref == 'refs/heads/main' && github.repository_owner == 'Systemcluster'
with:
crates-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
dry-run: ${{ !secrets.CARGO_REGISTRY_TOKEN }}
tag-crate: editpe