From 5f0ad414810d405f531bd397b2e8ffec007d56f0 Mon Sep 17 00:00:00 2001 From: galargh Date: Wed, 16 Sep 2026 00:18:56 +0200 Subject: [PATCH] Allow releaser target ref and sha inputs --- .github/workflows/releaser.yml | 21 ++++++++++++++++----- CHANGELOG.md | 4 ++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index 361d272..422ad8e 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -18,6 +18,14 @@ on: required: false type: boolean default: false + ref: + required: false + type: string + default: ${{ github.ref }} + sha: + required: false + type: string + default: ${{ github.sha }} runner: required: false type: string @@ -38,7 +46,10 @@ jobs: matrix: source: ${{ fromJSON(inputs.sources) }} steps: - - uses: actions/checkout@v5 + - id: checkout + uses: actions/checkout@v5 + with: + ref: ${{ inputs.sha }} - id: version name: Determine version env: @@ -116,7 +127,7 @@ jobs: if: steps.version.outputs.version != '' env: BRANCHES: ${{ inputs.branches }} - REF: ${{ github.ref }} + REF: ${{ inputs.ref }} uses: actions/github-script@v8 with: script: | @@ -135,8 +146,8 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} REPOSITORY: ${{ github.repository }} - REF: ${{ github.ref }} - SHA: ${{ github.sha }} + REF: ${{ inputs.ref }} + SHA: ${{ steps.checkout.outputs.commit }} uses: actions/github-script@v8 with: script: | @@ -187,7 +198,7 @@ jobs: draft: ${{ inputs.draft }} tag_name: ${{ steps.version.outputs.tag }} generate_release_notes: true - target_commitish: ${{ github.sha }} + target_commitish: ${{ steps.checkout.outputs.commit }} make_latest: ${{ steps.version.outputs.prefix == 'v' && steps.version.outputs.suffix == '' && steps.version.outputs.tag == steps.latest.outputs.latest }} token: ${{ secrets.UCI_GITHUB_TOKEN || github.token }} - name: Create release.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 4396b18..6910b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.0.45] - 2026-09-16 +### Added +- allow the `releaser` workflow to release a specific SHA while evaluating release policy against a separate ref + ## [1.0.44] - 2026-09-15 ### Fixed - reject multiline release version values and avoid unsafe prefix matching in release workflows