-
Notifications
You must be signed in to change notification settings - Fork 15
90 lines (78 loc) · 3.2 KB
/
release.yaml
File metadata and controls
90 lines (78 loc) · 3.2 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
name: Release Styrolite
on:
# This workflow runs on every push to main to either open
# a PR or publish the release.
push:
branches:
- main
permissions:
contents: read # Default token to read
jobs:
release-plz-release:
if: ${{ github.repository_owner == 'edera-dev' }}
name: Release-plz release
runs-on: ubuntu-latest
environment: release # Environment for trusted publishing
permissions:
contents: write # Needed to write release artifacts
id-token: write # Needed for trusted publishing
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # zizmor: ignore[stale-action-refs] -- pinned to stable branch
- name: generate cultivator token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: generate-token
with:
app-id: "${{ secrets.EDERA_CULTIVATION_APP_ID }}"
private-key: "${{ secrets.EDERA_CULTIVATION_APP_PRIVATE_KEY }}"
- name: Run release-plz
uses: release-plz/action@52440b50d383aa252927de395c8b2c1e0a9cf8e9 # v0.5
with:
command: release
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"
release-plz-pr:
if: ${{ github.repository_owner == 'edera-dev' }}
name: Release-plz PR
runs-on: ubuntu-latest
environment: release # Environment for trusted publishing
permissions:
contents: write # Needed to write release artifacts
id-token: write # Needed for trusted publishing
pull-requests: write # Needed to create pull requests
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # zizmor: ignore[stale-action-refs] -- pinned to stable branch
- name: generate cultivator token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: generate-token
with:
app-id: "${{ secrets.EDERA_CULTIVATION_APP_ID }}"
private-key: "${{ secrets.EDERA_CULTIVATION_APP_PRIVATE_KEY }}"
- name: Run release-plz
uses: release-plz/action@52440b50d383aa252927de395c8b2c1e0a9cf8e9 # v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"