forked from mirrors/homebox
wip: goreleaser
This commit is contained in:
parent
840d220d4f
commit
0949422aa3
3 changed files with 128 additions and 1 deletions
15
.github/workflows/pull-requests.yaml
vendored
15
.github/workflows/pull-requests.yaml
vendored
|
@ -13,3 +13,18 @@ jobs:
|
|||
frontend-tests:
|
||||
name: "Frontend and End-to-End Tests"
|
||||
uses: ./.github/workflows/partial-frontend.yaml
|
||||
|
||||
releaser:
|
||||
name: "Cross Compile and Release"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: goreleaser/goreleaser:v1.20
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Cross Compile and Release"
|
||||
run: goreleaser releaser --snapshot --clean --skip-publish
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -48,4 +48,5 @@ dist
|
|||
|
||||
.pnpm-store
|
||||
backend/app/api/app
|
||||
backend/app/api/__debug_bin
|
||||
backend/app/api/__debug_bin
|
||||
dist/
|
||||
|
|
111
backend/.goreleaser.yaml
Normal file
111
backend/.goreleaser.yaml
Normal file
|
@ -0,0 +1,111 @@
|
|||
# This is an example .goreleaser.yml file with some sensible defaults.
|
||||
# Make sure to check the documentation at https://goreleaser.com
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
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: homebox-darwin-amd64
|
||||
binary: homebox
|
||||
main: ./app/api/main.go
|
||||
goarch:
|
||||
- amd64
|
||||
goos:
|
||||
- darwin
|
||||
env:
|
||||
- CC=o64-clang
|
||||
- CXX=o64-clang++
|
||||
flags:
|
||||
- -trimpath
|
||||
|
||||
- id: homebox-darwin-arm64
|
||||
binary: homebox
|
||||
main: ./app/api/main.go
|
||||
goarch:
|
||||
- arm64
|
||||
goos:
|
||||
- darwin
|
||||
env:
|
||||
- CC=oa64-clang
|
||||
- CXX=oa64-clang++
|
||||
flags:
|
||||
- -trimpath
|
||||
|
||||
- id: homebox-linux-amd64
|
||||
binary: homebox
|
||||
main: ./app/api/main.go
|
||||
env:
|
||||
- CC=x86_64-linux-gnu-gcc
|
||||
- CXX=x86_64-linux-gnu-g++
|
||||
goarch:
|
||||
- amd64
|
||||
goos:
|
||||
- linux
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -extldflags "-lc -lrt -lpthread --static"
|
||||
|
||||
- id: homebox-linux-arm64
|
||||
binary: homebox
|
||||
main: ./app/api/main.go
|
||||
goarch:
|
||||
- arm64
|
||||
goos:
|
||||
- linux
|
||||
env:
|
||||
- CC=aarch64-linux-gnu-gcc
|
||||
- CXX=aarch64-linux-gnu-g++
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -extldflags "-lc -lrt -lpthread --static"
|
||||
|
||||
- id: homebox-windows-amd64
|
||||
binary: homebox
|
||||
main: ./app/api/main.go
|
||||
goarch:
|
||||
- amd64
|
||||
goos:
|
||||
- windows
|
||||
env:
|
||||
- CC=x86_64-w64-mingw32-gcc
|
||||
- CXX=x86_64-w64-mingw32-g++
|
||||
flags:
|
||||
- -trimpath
|
||||
- -buildmode=exe
|
||||
|
||||
archives:
|
||||
- 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
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ incpatch .Version }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
|
||||
# The lines beneath this are called `modelines`. See `:help modeline`
|
||||
# Feel free to remove those if you don't want/use them.
|
||||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
|
||||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
Loading…
Reference in a new issue