Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
46 changes: 22 additions & 24 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,39 @@ jobs:
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
actions: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 https://github.com/actions/checkout
with:
fetch-depth: 0
- uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4.3.0 https://github.com/googleapis/release-please-action/commits/main/
name: release-please
id: release-please
with:
skip-github-pull-request: true
skip-github-release: false
config-file: release-please-config-rc.json
manifest-file: .release-please-manifest.json
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 https://github.com/actions/checkout
if: steps.release-please.outputs.version
with:
fetch-depth: 0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 https://github.com/actions/setup-go
if: steps.release-please.outputs.version
with:
go-version-file: 'go.mod'
cache: true
- name: Create and Push RC Tag with Git
run: |
BASE_VERSION=$(echo "$GITHUB_REF" | sed 's/refs\/heads\/release\///')
echo "Base version is: $BASE_VERSION"
git fetch --tags
LATEST_RC_NUM=$(git tag | grep "^${BASE_VERSION}-rc." | sed 's/.*-rc.//' | sort -n | tail -1)
if [ -z "$LATEST_RC_NUM" ]; then
NEXT_RC_NUM=0
else
NEXT_RC_NUM=$((LATEST_RC_NUM + 1))
fi
NEXT_RC_TAG="${BASE_VERSION}-rc.${NEXT_RC_NUM}"
echo "Calculated next RC tag: $NEXT_RC_TAG"

# Configure git user
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"

# Create and push the new tag
git tag "$NEXT_RC_TAG" -m "Release Candidate $NEXT_RC_TAG"
git push origin "$NEXT_RC_TAG"
- name: retrieve GPG Credentials
if: steps.release-please.outputs.version
uses: rancher-eio/read-vault-secrets@main
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/signing/gpg passphrase | GPG_PASSPHRASE ;
secret/data/github/repo/${{ github.repository }}/signing/gpg privateKeyId | GPG_KEY_ID ;
secret/data/github/repo/${{ github.repository }}/signing/gpg privateKey | GPG_KEY
- name: import_gpg_key
if: steps.release-please.outputs.version
env:
GPG_PASSPHRASE: ${{ env.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ env.GPG_KEY_ID }}
Expand All @@ -64,8 +63,7 @@ jobs:
echo "Importing gpg key"
echo "${GPG_KEY}" | gpg --import --batch > /dev/null || { echo "Failed to import GPG key"; exit 1; }
- name: Run GoReleaser
if: steps.release-please.outputs.version
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 https://github.com/goreleaser/goreleaser-action
with:
args: release --clean
env:
Expand Down
4 changes: 1 addition & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ release:
extra_files:
- glob: 'terraform-registry-manifest.json'
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
# If you want to manually examine the release before its live, uncomment this line:
# draft: true
prerelease: false
prerelease: auto
changelog:
disable: true
1 change: 1 addition & 0 deletions aspell_custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ assignees
backport
url
gpg
rc
14 changes: 0 additions & 14 deletions release-please-config-rc.json

This file was deleted.