Skip to content

Commit

Permalink
Merge pull request #87 from gadget-inc/harry/prereleasing
Browse files Browse the repository at this point in the history
Add a prerelease github workflow for building and publishing unfinished versions
  • Loading branch information
airhorns authored May 5, 2024
2 parents 07612c1 + 6f08395 commit a2b4e6b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/prerelease.yml
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 }}
47 changes: 47 additions & 0 deletions .goreleaser.prerelease.yml
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

0 comments on commit a2b4e6b

Please sign in to comment.