-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from gadget-inc/harry/prereleasing
Add a prerelease github workflow for building and publishing unfinished versions
- Loading branch information
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Prerelease | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup golang environment | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.22" | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --clean -f .goreleaser.prerelease.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
builds: | ||
- main: ./cmd/client/main.go | ||
id: client | ||
binary: client | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}} | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- main: ./cmd/server/main.go | ||
id: server | ||
binary: server | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X github.com/gadget-inc/dateilager/pkg/version.Version=v{{.Version}} | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
hooks: | ||
post: | ||
- tar -zcf dist/migrations.tar.gz migrations | ||
|
||
changelog: | ||
skip: true | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
extra_files: | ||
- glob: ./dist/migrations.tar.gz | ||
|
||
archives: | ||
- name_template: "{{ .ProjectName }}-v{{ .Version }}-PRERELEASE-{{ .Os }}-{{ .Arch }}" | ||
|
||
|
||
release: | ||
prerelease: true | ||
extra_files: | ||
- glob: ./dist/migrations.tar.gz |