ci: allow release-plz to trigger actions #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release-plz | |
permissions: | |
pull-requests: write | |
contents: write | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-plz: | |
name: Release-plz | |
runs-on: ubuntu-latest | |
steps: | |
# Based on | |
# https://github.com/MarcoIeni/release-plz/blob/16ff38e4d3a52975ef989330e2dbda9ef0d4827b/.github/workflows/release-plz.yml#L18-L25 | |
# Generate a GitHub token, so that PRs and tags created by the | |
# release-plz-action trigger workflow actions. | |
- name: Generate GitHub token | |
uses: actions/create-github-app-token@v1 | |
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 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run release-plz | |
uses: MarcoIeni/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |