mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-29 11:44:53 +01:00
Add config for building/releasing binaries for other OSs
This commit is contained in:
parent
cf54d4b416
commit
4036a4594b
1
.github/workflows/go-test.yml
vendored
1
.github/workflows/go-test.yml
vendored
@ -17,6 +17,7 @@ jobs:
|
||||
with:
|
||||
go-version: 1.17
|
||||
- name: Go test
|
||||
if: !startsWith(github.event.head_commit.message, 'Release')
|
||||
run: make test
|
||||
- name: Build docker contains
|
||||
run: make build-api build-static
|
||||
|
12
.slsa-goreleaser-darwin-amd64.yml
Normal file
12
.slsa-goreleaser-darwin-amd64.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: 1
|
||||
|
||||
flags:
|
||||
- -trimpath
|
||||
|
||||
goos: darwin
|
||||
goarch: amd64
|
||||
|
||||
binary: hishtory-{{ .OS }}-{{ .Arch }}
|
||||
|
||||
ldflags:
|
||||
- '{{ .Env.VERSION_LDFLAGS }}'
|
12
.slsa-goreleaser-darwin-arm.yml
Normal file
12
.slsa-goreleaser-darwin-arm.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: 1
|
||||
|
||||
flags:
|
||||
- -trimpath
|
||||
|
||||
goos: darwin
|
||||
goarch: arm
|
||||
|
||||
binary: hishtory-{{ .OS }}-{{ .Arch }}
|
||||
|
||||
ldflags:
|
||||
- '{{ .Env.VERSION_LDFLAGS }}'
|
28
Makefile
28
Makefile
@ -9,12 +9,32 @@ acttest:
|
||||
act push -j test
|
||||
|
||||
release:
|
||||
# Bump the version
|
||||
expr `cat VERSION` + 1 > VERSION
|
||||
git add VERSION
|
||||
git commit -m "Bump hishtory version to v0.`cat VERSION`"
|
||||
git tag v0.`cat VERSION`
|
||||
git push
|
||||
git push --tags
|
||||
git commit -m "Release: start releasing v0.`cat VERSION`" --no-verify
|
||||
# Release linux-amd64
|
||||
cp .slsa-goreleaser-linux-amd64.yml .slsa-goreleaser.yml
|
||||
git add .slsa-goreleaser.yml
|
||||
git commit -m "Release linux-amd64 v0.`cat VERSION`" --no-verify
|
||||
git tag v0.`cat VERSION`-linux-amd64
|
||||
# Release darwin-amd64
|
||||
cp .slsa-goreleaser-darwin-amd64.yml .slsa-goreleaser.yml
|
||||
git add .slsa-goreleaser.yml
|
||||
git commit -m "Release darwin-amd64 v0.`cat VERSION`" --no-verify
|
||||
git tag v0.`cat VERSION`-darwin-amd64
|
||||
# Release darwin-arm64
|
||||
cp .slsa-goreleaser-darwin-arm64.yml .slsa-goreleaser.yml
|
||||
git add .slsa-goreleaser.yml
|
||||
git commit -m "Release darwin-arm64 v0.`cat VERSION`" --no-verify
|
||||
git tag v0.`cat VERSION`-darwin-arm64
|
||||
# Clean up by removing .slsa-goreleaser.yml
|
||||
rm .slsa-goreleaser.yml
|
||||
git add .slsa-goreleaser.yml
|
||||
git commit -m "Release: finish releasing v0.`cat VERSION`" --no-verify
|
||||
# Push to trigger the releases
|
||||
#git push
|
||||
#git push --tags
|
||||
|
||||
build-static:
|
||||
docker build -t gcr.io/dworken-k8s/hishtory-static -f backend/web/caddy/Dockerfile .
|
||||
|
Loading…
Reference in New Issue
Block a user