Skip to content

Commit

Permalink
fix(ci): do not version_bump (#3882)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg authored Oct 30, 2024
1 parent c913b13 commit 9ff5857
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ on:
pull_request:
workflow_dispatch:
inputs:
version-bump:
# Friendly description to be shown in the UI instead of 'name'
description: "Semver type of new version (major / minor / patch)"
# Input has to be provided for the workflow to run
required: true
type: choice
options:
- patch
- minor
- major
tag-as:
description: 'Tag for snapshot release (optional)'
required: false
Expand Down Expand Up @@ -88,31 +78,9 @@ jobs:
with:
go-version: ${{ needs.setup.outputs.go-version }}

# If this was a workflow dispatch event, we need to generate and push a tag
# for goreleaser to grab
version_bump:
needs: [hadolint, yamllint, markdown-lint, go-ci, setup]
runs-on: ubuntu-latest
permissions: "write-all"
steps:
- uses: actions/checkout@v4

- name: Bump version and push tag
# Placing the if condition here is a workaround for needing to block
# on this step during workflow dispatch events but the step not
# needing to run on tags. If we had the if condition on the full
# version_bump section, it would skip and not run, which would result
# in goreleaser not running either.
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: ${{ inputs.version-bump }}
release_branches: ${{ needs.setup.outputs.branch }}

# Generate the release with goreleaser to include pre-built binaries
goreleaser:
needs: [version_bump, setup]
needs: [setup]
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
Expand Down

0 comments on commit 9ff5857

Please sign in to comment.