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

- Changed the runner environment from 'ubuntu-latest' to 'ubuntu-22.04' in both auto-tag.yml and release.yml for consistency and to ensure compatibility with the latest features. - Renamed the input parameter from 'tag' to 'version' in release.yml to improve clarity regarding its purpose in the release process.
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
version:
|
|
description: "Version to release"
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
RELEASE_TOKEN:
|
|
required: true
|
|
GPG_PRIVATE_KEY:
|
|
required: true
|
|
PASSPHRASE:
|
|
required: true
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
submodules: recursive
|
|
|
|
- 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 }}
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
|
VERSION: ${{ inputs.version }}
|