From bb123d297f391f233aa05edf33d420674c1efd5f Mon Sep 17 00:00:00 2001 From: Oscar Wellner Date: Sat, 18 Jul 2026 23:04:28 +0200 Subject: [PATCH] ci: add release workflow Adds release.yml: a validate job (tag reachability/version/changelog checks via action-validate-release-tag and action-extract-release-notes, plus this repo's own format/lint checks) gated ahead of a create-release job that runs behind the release environment and self-hosts this repo's own action to cut the GitHub Release. --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..59d68ec --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: read + packages: read + +jobs: + validate: + name: Validate release tag + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + fetch-depth: 0 + + - name: Validate release tag + uses: dnd-mapp/action-validate-release-tag@cc07c1784188a50b4d1f931131bb14e480b2dd2a # v1.0.0 + + - name: Check changelog section + uses: dnd-mapp/action-extract-release-notes@2c44a78312de6d557ac11a76c316de06387824ee # v1.0.0 + with: + write-file: 'false' + + - name: Run continuous integration checks + uses: ./.github/actions/ci + with: + node-auth-token: ${{ secrets.GITHUB_TOKEN }} + + create-release: + name: Create GitHub release + needs: validate + runs-on: ubuntu-22.04 + environment: release + permissions: + contents: write + discussions: write + steps: + - name: Checkout repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Setup workspace + uses: dnd-mapp/action-setup-workspace@d5d3148fe3fbe34055eb006f685f190524c16522 # v2.0.0 + with: + install-dependencies: 'false' + + - name: Prepare release notes + uses: dnd-mapp/action-extract-release-notes@2c44a78312de6d557ac11a76c316de06387824ee # v1.0.0 + + - name: Create GitHub release + uses: ./