Skip to content

Commit

Permalink
feat: build sour in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Oct 31, 2024
1 parent d53a19e commit 699b2a5
Show file tree
Hide file tree
Showing 240 changed files with 87,202 additions and 74 deletions.
67 changes: 67 additions & 0 deletions .github/goreleaser-for-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright (c) 2022-present Bytebase (Hong Kong) Limited.
#
# Portions of this software are licensed as follows:
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
before:
hooks:
- go mod download
builds:
- id: sour
main: ./cmd/server/.
binary: sour
ldflags:
- -w -s
- -X github.com/cfoust/sour/pkg/version.Version={{.Version}}
- -X github.com/cfoust/sour/pkg/version.GoVersion=${GO_VERSION}
- -X github.com/cfoust/sour/pkg/version.GitCommit={{.Commit}}
- -X github.com/cfoust/sour/pkg/version.BuildTime={{.Date}}
tags:
- release
- embed_frontend
env:
- VERSION="development"
- GO_VERSION="1.23"
- CGO_ENABLED=1
- GIT_COMMIT="unknown"
- BUILD_TIME="unknown"
- BUILD_USER="unknown"
goos:
- darwin
goarch:
#- amd64
- arm64
snapshot:
name_template: "{{ incpatch .Version }}-next"
archives:
- builds:
- sour
files:
- LICENSE*
- README*
- src: "assets/dist/*"
dst: "assets"
brews:
- skip_upload: true
homepage: "https://github.com/cfoust/sour"
description: "A Sauerbraten server for the modern era."
license: "MIT"
repository:
owner: cfoust
name: homebrew-taps
68 changes: 68 additions & 0 deletions .github/goreleaser-for-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright (c) 2022-present Bytebase (Hong Kong) Limited.
#
# Portions of this software are licensed as follows:
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
before:
hooks:
- go mod download
builds:
- id: sour
main: ./cmd/server/.
binary: sour
ldflags:
- -w -s
- -X github.com/cfoust/sour/pkg/version.Version={{.Version}}
- -X github.com/cfoust/sour/pkg/version.GoVersion=${GO_VERSION}
- -X github.com/cfoust/sour/pkg/version.GitCommit={{.Commit}}
- -X github.com/cfoust/sour/pkg/version.BuildTime={{.Date}}
tags:
- release
- embed_frontend
env:
- VERSION="development"
- GO_VERSION="1.23"
- CGO_ENABLED=1
- GIT_COMMIT="unknown"
- BUILD_TIME="unknown"
- BUILD_USER="unknown"
goos:
- linux
goarch:
- amd64
overrides:
- goos: linux
goarch: amd64
env:
- CC=gcc
snapshot:
name_template: "{{ incpatch .Version }}-next"
archives:
- builds:
- sour
files:
- LICENSE*
- README*
- src: "assets/dist/*"
dst: "assets"
brews:
- skip_upload: true
repository:
owner: cfoust
name: homebrew-taps
42 changes: 42 additions & 0 deletions .github/goreleaser-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2022-present Bytebase (Hong Kong) Limited.
#
# Portions of this software are licensed as follows:
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
builds:
- skip: true
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
draft: true
mode: append
extra_files:
- glob: ./sour-build/**/*
- glob: ./sour-build/checksums.txt
name_template: "Release {{.Tag}}"
header: |
# What's Changed
## Features
## Code Diff
Loading

0 comments on commit 699b2a5

Please sign in to comment.