Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): add param to specify tag #3979

Merged
merged 8 commits into from
Dec 3, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
pull_request:
workflow_dispatch:
inputs:
tag-as:
description: 'Tag for snapshot release (optional)'
required: false
run-on-tag:
description: 'Tag for release'
required: true

jobs:
# set up go version for use through pipelines, setting
Expand Down Expand Up @@ -91,6 +91,10 @@ jobs:

- run: git fetch --force --tags

- name: Checkout a given tag
if: github.event_name == 'workflow_dispatch'
run: git checkout ${{ inputs.run-on-tag }}

- uses: actions/setup-go@v5
with:
go-version: ${{ needs.setup.outputs.go-version }}
Expand All @@ -104,13 +108,27 @@ jobs:

# Generate the binaries and release
- uses: goreleaser/goreleaser-action@v6
if: github.event_name == 'release'
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GORELEASER_CURRENT_TAG: ${{ github.event.release.tag_name }}
cristaloleg marked this conversation as resolved.
Show resolved Hide resolved

# Generate the binaries and release
- uses: goreleaser/goreleaser-action@v6
if: github.event_name == 'workflow_dispatch'
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GORELEASER_CURRENT_TAG: ${{ inputs.run-on-tag }}
cristaloleg marked this conversation as resolved.
Show resolved Hide resolved

upload-docs:
needs: goreleaser
Expand Down
Loading