Skip to content

goreleaser

goreleaser #22

Workflow file for this run

name: goreleaser
on:
workflow_dispatch:
tags:
- "v*.*.*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.4
- name: Configure Git for Private Modules
run: |
git config --global url."https://${{ secrets.GHT }}@github.com/".insteadOf "https://github.com/"
git config --global url."git@github.com:".insteadOf "https://github.com/"
env:
GITHUB_TOKEN: ${{ secrets.GHT }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GHT }}
GOPRIVATE: github.com/oneclickvirt/security
CGO_ENABLED: 0 # 禁用 CGO,强制静态链接