Skip to content

Merge branch 'ci-router-validate' #11

Merge branch 'ci-router-validate'

Merge branch 'ci-router-validate' #11

Workflow file for this run

name: Release Automation
on:
push:
branches: [main]
pull_request:
types: [closed]
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
pull-requests: write
issues: write # allow labeling the release PR
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
release-plz:
name: Release Please
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.1.7
with:
fetch-depth: 0
token: ${{ github.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Install release-plz
run: cargo install release-plz --locked
- name: Run release-plz
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
release-plz release-pr --git-token "$GITHUB_TOKEN"
# Auto-release when the Release PR is merged into main
release:
name: Create Release
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.1.7
with:
fetch-depth: 0
# Ensure we operate against the main branch after merge
ref: main
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: stable
- name: Install release-plz
run: cargo install release-plz --locked
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
release-plz release --git-token "$GITHUB_TOKEN"