-
Notifications
You must be signed in to change notification settings - Fork 22
66 lines (63 loc) · 2.01 KB
/
publish.yml
File metadata and controls
66 lines (63 loc) · 2.01 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
name: Release-plz
on:
push:
branches:
- main
jobs:
release-plz-release:
name: Release-plz release
environment: release # Optional: for enhanced security
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'agentclientprotocol' }}
permissions:
contents: write
id-token: write
steps:
- &checkout
name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
persist-credentials: false
- &install-rust
name: Install Rust toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
- &generate-token
# Generating a GitHub token, so that PRs and tags created by
# the release-plz-action can trigger actions workflows.
name: Generate GitHub token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3
id: generate-token
with:
# GitHub App ID secret name
app-id: ${{ secrets.RELEASE_PLZ_APP_ID }}
# GitHub App private key secret name
private-key: ${{ secrets.RELEASE_PLZ_APP_PRIVATE_KEY }}
- name: Run release-plz
uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11
with:
command: release
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'agentclientprotocol' }}
permissions:
pull-requests: write
contents: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- *checkout
- *install-rust
- *generate-token
- name: Run release-plz
uses: release-plz/action@1528104d2ca23787631a1c1f022abb64b34c1e11
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}