mirror of https://github.com/bjdgyc/anylink.git
修改配置参数
This commit is contained in:
parent
70f3e46ef7
commit
56576cb22a
|
@ -0,0 +1,28 @@
|
||||||
|
name: release-tag-version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v0.*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Build:
|
||||||
|
name: build-binary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- run: git fetch --unshallow --quiet --tags --force
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: '1.20'
|
||||||
|
go-version-file: 'server/go.mod'
|
||||||
|
cache-dependency-path: 'server/go.sum'
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
|
||||||
|
Docker:
|
||||||
|
name: build-docker
|
|
@ -3,4 +3,5 @@
|
||||||
anylink-deploy
|
anylink-deploy
|
||||||
anylink-deploy.tar.gz
|
anylink-deploy.tar.gz
|
||||||
|
|
||||||
dist
|
dist
|
||||||
|
godist
|
|
@ -0,0 +1,62 @@
|
||||||
|
#https://goreleaser.com/static/schema.json
|
||||||
|
|
||||||
|
# goreleaser build --skip=validate --clean --debug
|
||||||
|
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
dist: godist
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
# You may remove this if you don't use go modules.
|
||||||
|
#- go mod tidy
|
||||||
|
# you may remove this if you don't need go generate
|
||||||
|
#- go generate ./...
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- id: "build"
|
||||||
|
#main: .
|
||||||
|
dir: ./server
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- >-
|
||||||
|
{{- if eq .Os "darwin" }}
|
||||||
|
{{- if eq .Arch "amd64"}}CC=o64-clang{{- end }}
|
||||||
|
{{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .Os "linux" }}
|
||||||
|
{{- if eq .Arch "arm64" }}CC=aarch64-linux-gnu-gcc{{- end }}
|
||||||
|
{{- if eq .Arch "arm" }}CC=arm-linux-gnueabi-gcc{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
#- darwin
|
||||||
|
#- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
- arm
|
||||||
|
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- id: "archive1"
|
||||||
|
format: tar.gz
|
||||||
|
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||||
|
name_template: >-
|
||||||
|
{{ .ProjectName }}_
|
||||||
|
{{- title .Os }}_
|
||||||
|
{{- if eq .Arch "amd64" }}x86_64
|
||||||
|
{{- else if eq .Arch "386" }}i386
|
||||||
|
{{- else }}{{ .Arch }}{{ end }}
|
||||||
|
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||||
|
# use zip for windows archives
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- "^docs:"
|
||||||
|
- "^test:"
|
Loading…
Reference in New Issue