From f0f77352ae05b6708ad2a39fdb7fc7897bf5a38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=85=8E=E9=A5=BC=E6=9E=9C=E5=AD=90=E5=8D=B7=E9=B2=A8?= =?UTF-8?q?=E9=B1=BC=E8=BE=A3=E6=A4=92?= Date: Mon, 30 Dec 2024 19:15:49 +0800 Subject: [PATCH] chore: simplify auto-tag workflow by removing GPG signing steps - Removed GPG key import and signing conditions from the auto-tag-release.yml workflow to streamline the release process. - Updated GoReleaser execution conditions to focus solely on version tagging, enhancing clarity and reducing complexity. --- .github/workflows/auto-tag-release.yml | 45 ++------------------------ 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/.github/workflows/auto-tag-release.yml b/.github/workflows/auto-tag-release.yml index 250f1c1..322e583 100644 --- a/.github/workflows/auto-tag-release.yml +++ b/.github/workflows/auto-tag-release.yml @@ -131,22 +131,6 @@ jobs: git tag -a $new_tag -m "Release $new_tag" git push origin $new_tag - # Release 相关步骤 - - name: Import GPG key - id: import_gpg - if: | - (startsWith(github.ref, 'refs/tags/v') || - (success() && steps.get_latest_tag.outputs.version != '')) && - !inputs.skip_signing - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.PASSPHRASE }} - git_config_global: true - git_user_signingkey: true - git_commit_gpgsign: true - git_tag_gpgsign: true - # 在 Run GoReleaser 之前添加配置检查步骤 - name: Check GoReleaser config run: | @@ -171,34 +155,9 @@ jobs: go mod vendor fi - # 修改 GoReleaser 步骤的环境变量 + # 修改 GoReleaser 步骤 - name: Run GoReleaser - if: | - (startsWith(github.ref, 'refs/tags/v') || - (success() && steps.get_latest_tag.outputs.version != '')) && - (steps.import_gpg.outcome == 'success' || steps.import_gpg.outcome == 'skipped') - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: latest - args: release --clean --timeout 60m - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - VERSION: ${{ steps.get_latest_tag.outputs.version }} - CGO_ENABLED: 0 - GOFLAGS: -mod=vendor - GOPATH: ${{ github.workspace }}/go - GOROOT: ${{ env.GOROOT }} - GOCACHE: ${{ github.workspace }}/.cache/go-build - GOMODCACHE: ${{ github.workspace }}/go/pkg/mod - - # 修改无 GPG 的 GoReleaser 步骤 - - name: Run GoReleaser without GPG - if: | - (startsWith(github.ref, 'refs/tags/v') || - (success() && steps.get_latest_tag.outputs.version != '')) && - (inputs.skip_signing || steps.import_gpg.outcome == 'skipped') + if: startsWith(github.ref, 'refs/tags/v') || (success() && steps.get_latest_tag.outputs.version != '') uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser