mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 12:32:06 +08:00
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.
This commit is contained in:
parent
c1d5ba84b3
commit
f0f77352ae
45
.github/workflows/auto-tag-release.yml
vendored
45
.github/workflows/auto-tag-release.yml
vendored
@ -131,22 +131,6 @@ jobs:
|
|||||||
git tag -a $new_tag -m "Release $new_tag"
|
git tag -a $new_tag -m "Release $new_tag"
|
||||||
git push origin $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 之前添加配置检查步骤
|
# 在 Run GoReleaser 之前添加配置检查步骤
|
||||||
- name: Check GoReleaser config
|
- name: Check GoReleaser config
|
||||||
run: |
|
run: |
|
||||||
@ -171,34 +155,9 @@ jobs:
|
|||||||
go mod vendor
|
go mod vendor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 修改 GoReleaser 步骤的环境变量
|
# 修改 GoReleaser 步骤
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
if: |
|
if: startsWith(github.ref, 'refs/tags/v') || (success() && steps.get_latest_tag.outputs.version != '')
|
||||||
(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')
|
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user