From a5b1cacb5a6f18ec3dd2a0862653647b43f59e60 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Wed, 28 Jan 2026 21:17:40 -0500 Subject: [PATCH] chore(xfer): update release workflow Post-transfer update of release workflow. Signed-off-by: Ryan Johnson --- .github/workflows/release.yml | 39 ++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff5e6334..e9995207 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,32 +1,26 @@ -# SPDX-License-Identifier: MPL-2.0 +--- +# This workflow releases a new version of the plugin. + +name: Release -# This GitHub action can publish assets for release when a tag is created. -# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0). -# -# This uses an action (hashicorp/ghaction-import-gpg) that assumes you set your -# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `GPG_PASSPHRASE` -# secret. If you would rather own your own GPG handling, please fork this action -# or use an alternative one for key handling. -# -# You will need to pass the `--batch` flag to `gpg` in your signing step -# in `goreleaser` to indicate this is being used in a non-interactive mode. -# -name: release on: push: tags: - 'v*' + permissions: contents: write packages: read + jobs: get-go-version: runs-on: ubuntu-latest outputs: go-version: ${{ steps.get-go-version.outputs.go-version }} steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: 'Determine Go version' + - name: Checkout Repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Get Go Version id: get-go-version run: | echo "Found Go $(cat .go-version)" @@ -36,28 +30,31 @@ jobs: - get-go-version runs-on: ubuntu-latest steps: - - name: Checkout + - name: Checkout Repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Unshallow run: git fetch --prune --unshallow - - name: Set up Go + - name: Setup Go uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 with: go-version: ${{ needs.get-go-version.outputs.go-version }} - - name: Describe plugin + - name: Describe Plugin id: plugin_describe run: echo "api_version=$(go run . describe | jq -r '.api_version')" >> "$GITHUB_OUTPUT" - - name: Import GPG key + - name: Import GPG Key id: import_gpg uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 + uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 with: version: latest - args: release --clean --timeout 120m + args: > + release + --clean + --timeout 120m env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}