mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-12-24 12:37:53 +08:00
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: goreleaser
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
# 1.20 是 Windows 7/8 Server 2008/2012 最后一个支持版本
|
|
image: goreleaser/goreleaser-cross:v1.20
|
|
steps:
|
|
- run: |
|
|
git config --global --add safe.directory /__w/ecs/ecs
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.24.5
|
|
|
|
- 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@v2
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
GOPRIVATE: github.com/oneclickvirt/security |