-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (74 loc) · 2.29 KB
/
Copy pathrelease.yml
File metadata and controls
91 lines (74 loc) · 2.29 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: release
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: stable
components: clippy
- name: Using Rust cache
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
cache-all-crates: "true"
- name: Clippy
run: make clippy
- name: Test
run: make test
codegen-rust:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: stable
components: clippy,rustfmt
- name: Using Rust cache
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
cache-all-crates: "true"
prefix-key: v0-rust-codegen-release
- name: Generate Rust snapshot tests
run: make codegen-rust
- name: Lint generated Rust
run: make lint-codegen-rust
- name: Test generated Rust
run: make test-codegen-rust
publish:
needs: [verify, codegen-rust]
runs-on: ubuntu-latest
environment: crates-io
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: stable
- name: Publish to crates.io
uses: katyo/publish-crates@02cc2f1ad653fb25c7d1ff9eb590a8a50d06186b # v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
publish-delay: 30000
bump-patch:
needs: publish
uses: ./.github/workflows/bump.yml
with:
bump: patch
secrets:
PLOTNIK_PAT: ${{ secrets.PLOTNIK_PAT }}
permissions:
contents: write
pull-requests: write