mirror of https://github.com/allinssl/allinssl
debug ci
parent
1eb25c7b55
commit
5fb796a97d
|
@ -2,6 +2,8 @@ name: goreleaser
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
|
@ -22,6 +24,11 @@ jobs:
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
-
|
||||||
|
name: Set Release Version
|
||||||
|
id: set_version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_VERSION=latest" >> $GITHUB_ENV
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
|
@ -29,7 +36,7 @@ jobs:
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
args: release --clean
|
args: release --clean --snapshot
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
version: 2
|
version: 2
|
||||||
release:
|
release:
|
||||||
disable: false
|
disable: false
|
||||||
|
# 覆盖之前的release
|
||||||
|
replace_existing_draft: true
|
||||||
|
prerelease: auto
|
||||||
|
mode: replace
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
# 删除已有的frontend文件夹
|
||||||
|
- rm -rf frontend || true
|
||||||
|
# 复制build到frontend
|
||||||
|
- cp -r build frontend || true
|
||||||
|
# 打包前先执行一些必要的操作
|
||||||
|
- go mod tidy
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||||
|
@ -9,11 +21,16 @@ archives:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- README.md
|
- README.md
|
||||||
- config.yaml
|
- config.yaml
|
||||||
|
- src: "frontend/**/*"
|
||||||
|
dst: "frontend"
|
||||||
|
- src: "script/allinssl.sh"
|
||||||
|
dst: "allinssl.sh"
|
||||||
checksum:
|
checksum:
|
||||||
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
|
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
|
main: ./cmd/main.go
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
|
|
Loading…
Reference in New Issue