add: goreleaser
This commit is contained in:
parent
54d6eb0f75
commit
8c115a82ff
28
.github/workflows/goreleaser.yaml
vendored
Normal file
28
.github/workflows/goreleaser.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.21.5
|
||||
|
||||
- name: Run goreleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.vscode/launch.json
|
||||
.vscode/settings.json
|
||||
dist
|
||||
*test.go
|
||||
template.json
|
||||
template.json
|
||||
|
19
.goreleaser.yaml
Normal file
19
.goreleaser.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
project_name: sub2sing-box
|
||||
builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- windows
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
- "386"
|
||||
ldflags:
|
||||
- -s -w
|
||||
no_unique_dist_dir: true
|
||||
binary: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
|
||||
archives:
|
||||
- format: binary
|
Loading…
x
Reference in New Issue
Block a user