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
# release-plz (git-only mode): keeps a release PR up to date on every push to main and, once it
# is merged, creates the vX.Y.Z / <crate>-vX.Y.Z tags and GitHub Releases. It never publishes: the
# tag push starts publish-crates-io.yml, which publishes from the tag-restricted `crates-io` environment.
# The App token matters: tags and PRs created with GITHUB_TOKEN would not trigger other workflows.
name: Release-plz
on:
push:
branches:
permissions:
jobs:
release-plz-release:
name: Release-plz release
if: github.repository_owner == 'sunsided'
runs-on: ubuntu-latest
# No concurrency group here: cancelling a pending run could skip a release.
permissions:
contents: read
steps:
- uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
id: app-token
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: read
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
with:
toolchain: stable
- uses: release-plz/action@66b324fd6c72d05d2a08568492ecdd62bfb8a62b # v0.5.148
with:
command: release
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
release-plz-pr:
name: Release-plz PR
if: github.repository_owner == 'sunsided'
runs-on: ubuntu-latest
permissions:
contents: read
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0
id: app-token
with:
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
with:
toolchain: stable
- uses: release-plz/action@66b324fd6c72d05d2a08568492ecdd62bfb8a62b # v0.5.148
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}