diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af4d75851..23e684282 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,15 @@ name: Release on: workflow_dispatch: + inputs: + tag: + description: "Release tag to build" + required: true + type: string + previous_tag: + description: "Previous release tag" + required: true + type: string release: types: - published @@ -18,6 +27,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 + ref: ${{ github.event.release.tag_name || inputs.tag }} - name: Set up Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 @@ -53,6 +63,8 @@ jobs: args: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GORELEASER_CURRENT_TAG: ${{ github.event.release.tag_name || inputs.tag }} + GORELEASER_PREVIOUS_TAG: ${{ inputs.previous_tag }} BUILD_DATE: ${{ steps.date.outputs.date }} BUILD_TS_UNIX: ${{ steps.timestamp.outputs.timestamp }} GIT_BRANCH: ${{ steps.branch.outputs.branch }}