chore: run tests within merge queue (#122) #21
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 | |
permissions: | |
pull-requests: write | |
contents: write | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# Release unpublished packages. | |
release-plz-release: | |
name: Release-plz release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate GitHub token | |
uses: actions/create-github-app-token@v1 | |
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_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: Run release-plz release | |
uses: MarcoIeni/[email protected] | |
with: | |
command: release | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
# Create a PR with the new versions and changelog, preparing the next release. | |
release-plz-pr: | |
name: Release-plz PR | |
runs-on: ubuntu-latest | |
concurrency: | |
group: release-plz-${{ github.ref }} | |
cancel-in-progress: false | |
steps: | |
- name: Generate GitHub token | |
uses: actions/create-github-app-token@v1 | |
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_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: Run release-plz PR task | |
uses: MarcoIeni/[email protected] | |
with: | |
command: release-pr | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |