From 42ce6831bfda430a97a3f65aa590ee6cf9dee43f Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 02:37:05 +0100 Subject: [PATCH] ci: pin goreleaser action version --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 32 ++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98b4d33..a64b0ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,19 +60,19 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v2" args: check --config .goreleaser.yaml - name: GoReleaser check (linux/windows) uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v2" args: check --config .goreleaser-linux-windows.yaml - name: GoReleaser build (linux amd64/arm64) uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v2" args: build --snapshot --clean --config .goreleaser-linux-windows.yaml --id wacli_linux_amd64 --id wacli_linux_arm64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba5a162..aeeaf4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,13 +36,15 @@ jobs: - name: Checkout release tag if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.tag }} + env: + RELEASE_TAG: ${{ inputs.tag }} + run: git checkout -- "$RELEASE_TAG" - name: GoReleaser (macOS universal) uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v2" args: release --clean --config /tmp/.goreleaser.yaml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -52,11 +54,15 @@ jobs: needs: goreleaser-darwin steps: - name: Resolve release tag + env: + EVENT_NAME: ${{ github.event_name }} + INPUT_TAG: ${{ inputs.tag }} + REF_NAME: ${{ github.ref_name }} run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "RELEASE_TAG=${{ inputs.tag }}" >> $GITHUB_ENV + if [ "$EVENT_NAME" = "workflow_dispatch" ]; then + echo "RELEASE_TAG=$INPUT_TAG" >> "$GITHUB_ENV" else - echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "RELEASE_TAG=$REF_NAME" >> "$GITHUB_ENV" fi - name: Dispatch tap formula update @@ -126,23 +132,29 @@ jobs: - name: Checkout release tag if: ${{ github.event_name == 'workflow_dispatch' }} - run: git checkout ${{ inputs.tag }} + env: + RELEASE_TAG: ${{ inputs.tag }} + run: git checkout -- "$RELEASE_TAG" - name: GoReleaser (linux/windows) uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: "~> v2" args: release --clean --skip=publish --config /tmp/.goreleaser-linux-windows.yaml env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Resolve release tag + env: + EVENT_NAME: ${{ github.event_name }} + INPUT_TAG: ${{ inputs.tag }} + REF_NAME: ${{ github.ref_name }} run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - echo "RELEASE_TAG=${{ inputs.tag }}" >> $GITHUB_ENV + if [ "$EVENT_NAME" = "workflow_dispatch" ]; then + echo "RELEASE_TAG=$INPUT_TAG" >> "$GITHUB_ENV" else - echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "RELEASE_TAG=$REF_NAME" >> "$GITHUB_ENV" fi - name: Upload linux/windows artifacts