mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-08-02 22:07:36 +08:00

- Updated permissions in both auto-tag.yml and release.yml to include write access for issues and pull requests. - Changed the checkout action version from v4 to v3 in both workflows for consistency. - Updated Go setup action version from v5 to v4 and specified the Go version as "1.21". - Adjusted GPG import action version from v6 to v5. - Updated GoReleaser action version from v5 to v4 and specified the release version as v1.21.2. - Standardized string quotes in YAML files for consistency.
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_call:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
submodules: recursive
|
|
|
|
- name: Debug Files
|
|
run: |
|
|
pwd
|
|
ls -la
|
|
echo "Current directory contents:"
|
|
ls -R
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: "1.21"
|
|
cache: true
|
|
|
|
- name: Import GPG key
|
|
id: import_gpg
|
|
uses: crazy-max/ghaction-import-gpg@v5
|
|
with:
|
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
passphrase: ${{ secrets.PASSPHRASE }}
|
|
if: ${{ env.GPG_PRIVATE_KEY != '' }}
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
distribution: goreleaser
|
|
version: v1.21.2
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|