feat: friendlier 401 error message (#50) #50
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| release-plz-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| actions: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: release-plz/action@v0.5 | |
| id: release-plz | |
| with: | |
| command: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Dispatch release artifacts build | |
| if: steps.release-plz.outputs.releases_created == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASES: ${{ steps.release-plz.outputs.releases }} | |
| run: | | |
| set -euo pipefail | |
| echo "$RELEASES" | jq -r '.[].tag' | while read -r tag; do | |
| echo "Dispatching release.yml for $tag" | |
| gh workflow run release.yml -f tag="$tag" | |
| done | |
| - name: Trigger wavekat.com docs rebuild | |
| if: steps.release-plz.outputs.releases_created == 'true' | |
| env: | |
| CF_PAGES_DEPLOY_HOOK: ${{ secrets.CF_PAGES_DEPLOY_HOOK }} | |
| run: | | |
| set -euo pipefail | |
| if [ -z "${CF_PAGES_DEPLOY_HOOK:-}" ]; then | |
| echo "CF_PAGES_DEPLOY_HOOK not set — skipping wavekat.com rebuild." | |
| exit 0 | |
| fi | |
| curl -fsS -X POST "$CF_PAGES_DEPLOY_HOOK" > /dev/null | |
| echo "Triggered wavekat.com rebuild." | |
| release-plz-pr: | |
| needs: release-plz-release | |
| if: always() | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: release-plz-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: release-plz/action@v0.5 | |
| id: release-plz | |
| with: | |
| command: release-pr | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Job summary | |
| if: always() | |
| run: | | |
| echo "## Release PR" >> "$GITHUB_STEP_SUMMARY" | |
| if [ "${{ steps.release-plz.outputs.prs_created }}" = "true" ]; then | |
| echo "Release PR created." >> "$GITHUB_STEP_SUMMARY" | |
| else | |
| echo "No release PR created." >> "$GITHUB_STEP_SUMMARY" | |
| fi |