mirror of
https://github.com/danielmiessler/fabric.git
synced 2026-09-10 07:36:44 -04:00
chore: update CI workflow and simplify goreleaser build configuration
## CHANGES - Add changelog database to git tracking - Remove unnecessary goreleaser comments - Add version metadata to default build - Rename windows build from garbled to standard - Remove garble obfuscation from windows build - Standardize ldflags across all build targets - Inject version info during compilation
This commit is contained in:
parent
079b2b5b28
commit
13178456e5
|
|
@ -95,6 +95,7 @@ jobs:
|
|||
run: |
|
||||
go run ./cmd/generate_changelog --process-prs ${{ steps.increment_version.outputs.new_tag }}
|
||||
go run ./cmd/generate_changelog --sync-db
|
||||
git add ./cmd/generate_changelog/changelog.db
|
||||
- name: Commit changes
|
||||
run: |
|
||||
# These files are modified by the version bump process
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ version: 2
|
|||
project_name: fabric
|
||||
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: default
|
||||
|
|
@ -19,19 +16,28 @@ builds:
|
|||
- linux
|
||||
main: ./cmd/fabric
|
||||
binary: fabric
|
||||
- id: windows-garbled
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X main.version={{.Version}}
|
||||
- -X main.commit={{.ShortCommit}}
|
||||
- -X main.date={{.Date}}
|
||||
- -X main.builtBy=goreleaser
|
||||
- -X main.tag={{.Tag}}
|
||||
|
||||
- id: windows-build
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- windows
|
||||
main: ./cmd/fabric
|
||||
binary: fabric
|
||||
tool: garble
|
||||
# From https://github.com/eyevanovich/garble-goreleaser-example/blob/main/.goreleaser.yaml
|
||||
# command is a single string.
|
||||
command: "-tiny"
|
||||
flags: [ "-seed=random", "build" ]
|
||||
ldflags: [ "-s", "-w" ]
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X main.version={{.Version}}
|
||||
- -X main.commit={{.ShortCommit}}
|
||||
- -X main.date={{.Date}}
|
||||
- -X main.builtBy=goreleaser
|
||||
- -X main.tag={{.Tag}}
|
||||
|
||||
archives:
|
||||
- formats: [tar.gz]
|
||||
|
|
|
|||
Loading…
Reference in a new issue