Skip to content

Commit

Permalink
Fix release process for hotfix 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktavious committed Aug 21, 2024
1 parent 848319a commit 20fa281
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .changes/unreleased/Bugfix-20240821-104127.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: Bugfix
body: Fix state upgrader for checks created by 1.0.x and 1.1.x so that you can properly
upgrade to 1.2.x
time: 2024-08-21T10:41:27.506151-05:00
33 changes: 10 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ name: "Release"
on:
workflow_dispatch:
inputs:
bump:
description: 'The version bump type'
version:
description: 'The version to use for release - make sure it starts with v'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
type: string
repository_dispatch:
types:
- release
Expand All @@ -31,14 +26,6 @@ jobs:
token: ${{ secrets.ORG_GITHUB_TOKEN }}
- name: Fetch All Tags
run: git fetch --force --tags
- name: Determine Next Version
id: next_version
uses: zwaldowski/semver-release-action@v4
with:
dry_run: true
bump: ${{ inputs.bump || toJson(github.event.client_payload.bump) }}
prefix: "v"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand All @@ -52,12 +39,12 @@ jobs:
${{ runner.os }}-go-
- name: Ensure Changelog
run: |
if test -f ./.changes/${{ steps.next_version.outputs.version_tag }}.md
if test -f ./.changes/${{ inputs.version }}.md
then
echo "Skip Changie..."
else
go install github.com/miniscruff/changie@latest
changie batch ${{ steps.next_version.outputs.version_tag }}
changie batch ${{ inputs.version }}
changie merge
fi
- name: Generate Terraform Docs
Expand All @@ -72,18 +59,18 @@ jobs:
if [[ $(git diff --stat) != '' ]];
then
git add .
git commit -m "Cut Release '${{ steps.next_version.outputs.version_tag }}'"
git commit -m "Cut Release '${{ inputs.version }}'"
git push origin HEAD
else
echo "Skip commit"
fi
git tag -f ${{ steps.next_version.outputs.version_tag }} -m "Cut Release '${{ steps.next_version.outputs.version_tag }}'"
git push -f origin refs/tags/${{ steps.next_version.outputs.version_tag }}
git tag -f ${{ inputs.version }} -m "Cut Release '${{ inputs.version }}'"
git push -f origin refs/tags/${{ inputs.version }}
- name: Ensure Release Does Not Exist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete ${{ steps.next_version.outputs.version_tag }} || true
gh release delete ${{ inputs.version }} || true
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
Expand All @@ -93,7 +80,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6.0.0
with:
args: release --clean --release-notes=./.changes/${{ steps.next_version.outputs.version_tag }}.md
args: release --clean --release-notes=./.changes/${{ inputs.version }}.md
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 20fa281

Please sign in to comment.