-
Notifications
You must be signed in to change notification settings - Fork 16
41 lines (34 loc) · 1.14 KB
/
release.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
name: Release and Publish
on:
pull_request_target:
types:
- closed
jobs:
release-and-publish:
if: ${{ github.event.pull_request.merged && contains(github.event.pull_request.labels.*.name, 'release') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Get latest stable Rust version
run: |
echo "LATEST_STABLE_RUST_VERSION=$(gh api /repos/rust-lang/rust/releases --jq ".[0].tag_name")" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Toolchain
uses: actions/cache@v4
with:
path: ~/.rustup
key: toolchain-x86-64-${{ env.LATEST_STABLE_RUST_VERSION }}
- name: Install `stable` Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt,clippy
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}