Skip to content

Commit 3f3453b

Browse files
fix: allow specifying sha (#1767)
Signed-off-by: matttrach <matt.trachier@suse.com> Co-authored-by: Matt Trachier <matt.trachier@suse.com>
1 parent a8ab38b commit 3f3453b

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

.github/workflows/manual-rc-release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
tag:
77
description: 'The rc tag to create, e.g. v1.2.3-rc.1'
88
required: true
9+
sha:
10+
description: 'The commit SHA to create the tag from, defaults to HEAD of the selected branch.'
11+
required: false
912

1013
permissions:
1114
contents: write
@@ -22,15 +25,17 @@ jobs:
2225
- name: Create and Push RC Tag with Git
2326
id: create-push-rc-tag
2427
env:
25-
NEXT_RC_TAG: ${{ inputs.tag }}
28+
TAG: ${{ inputs.tag }}
29+
SHA: ${{ inputs.sha }}
2630
run: |
27-
# Configure git user
2831
git config user.name "${{ github.actor }}"
2932
git config user.email "${{ github.actor }}@users.noreply.github.com"
30-
31-
# Create and push the new tag
32-
git tag "$NEXT_RC_TAG" -m "Release Candidate $NEXT_RC_TAG"
33-
git push origin "$NEXT_RC_TAG"
33+
if [ -n "$SHA" ]; then
34+
git tag "$TAG" -m "Release Candidate $TAG" "$SHA"
35+
else
36+
git tag "$TAG" -m "Release Candidate $TAG"
37+
fi
38+
git push origin "$TAG"
3439
- name: retrieve GPG Credentials
3540
id: retrieve-gpg-credentials
3641
uses: rancher-eio/read-vault-secrets@main

.github/workflows/manual-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ jobs:
3030
run: |
3131
git config user.name "${{ github.actor }}"
3232
git config user.email "${{ github.actor }}@users.noreply.github.com"
33-
if [ -n "${SHA}" ]; then
34-
git checkout "$SHA"
33+
if [ -n "$SHA" ]; then
34+
git tag "$TAG" -m "Release $TAG" "$SHA"
35+
else
36+
git tag "$TAG" -m "Release $TAG"
3537
fi
36-
git tag "$TAG" -m "Release $TAG"
3738
git push origin "$TAG"
3839
- name: retrieve GPG Credentials
3940
id: retrieve-gpg-credentials
@@ -66,7 +67,7 @@ jobs:
6667
- name: Run GoReleaser
6768
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 https://github.com/goreleaser/goreleaser-action
6869
with:
69-
args: release --clean --config .goreleaser_rc.yml
70+
args: release --clean --config .goreleaser.yml
7071
env:
7172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7273
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}

.goreleaser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ builds:
3030
ignore:
3131
- goos: windows
3232
goarch: arm
33+
- goos: windows
34+
goarch: arm64
3335
archives:
3436
- formats: [ 'zip' ]
3537
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'

terraform-registry-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 1,
33
"metadata": {
4-
"protocol_versions": ["6.0"]
4+
"protocol_versions": ["4.0"]
55
}
66
}

0 commit comments

Comments
 (0)