-
Notifications
You must be signed in to change notification settings - Fork 24
57 lines (46 loc) · 1.45 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: 𝌚 Release
on:
workflow_dispatch:
inputs:
force-publish:
required: true
type: boolean
description: Publish Releases at Anytime
workflow_run:
workflows: [ 🧪 Tests and Checks ]
branches: [main]
types: [ completed ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-plz:
if: >
github.ref == 'refs/heads/main' &&
github.repository_owner == 'ipvm-wg' &&
(github.event_name == 'workflow_dispatch' && github.event.inputs.force-publish) || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Generate GitHub token
uses: tibdex/github-app-token@v2
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Project
uses: Swatinem/rust-cache@v2
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}