- Workflow callers: - grant `contents: read` and `checks: write` when invoking the reusable test suite from CI validation, nightly builds, and main release automation - align caller permissions with the nested `backend-tests` and `frontend-tests` jobs so GitHub accepts the workflow graph - Validation: - keep workflow YAML parsing clean after the permission wiring change - keep `git diff --check` clean for the touched workflow files
76 lines
2.5 KiB
YAML
76 lines
2.5 KiB
YAML
name: Release - Semantic Stable
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: release-main
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
migration-check:
|
|
name: Flyway Migration Check
|
|
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
uses: ./.github/workflows/migrations-check.yml
|
|
with:
|
|
base_ref: ${{ github.event.before }}
|
|
head_ref: ${{ github.sha }}
|
|
checkout_ref: ${{ github.sha }}
|
|
|
|
test-suite:
|
|
name: Test Suite
|
|
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
needs: [migration-check]
|
|
uses: ./.github/workflows/test-suite.yml
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
with:
|
|
checkout_ref: ${{ github.sha }}
|
|
|
|
semantic-release:
|
|
name: Compute Release, Update Changelog, and Draft GitHub Release
|
|
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
needs: [migration-check, test-suite]
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Set Up Node.js
|
|
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
|
|
with:
|
|
node-version: '24'
|
|
cache: 'npm'
|
|
cache-dependency-path: tools/release/package-lock.json
|
|
|
|
- name: Install Release Tooling Dependencies
|
|
run: npm --prefix tools/release ci
|
|
|
|
- name: Configure Release Bot Git Identity
|
|
env:
|
|
RELEASE_GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git remote set-url origin "https://x-access-token:${RELEASE_GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
|
|
|
- name: Run semantic-release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
|
|
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
|
|
GIT_AUTHOR_NAME: github-actions[bot]
|
|
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
|
GIT_COMMITTER_NAME: github-actions[bot]
|
|
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
|
run: npx --prefix tools/release semantic-release --extends ./tools/release/release.config.cjs
|