Split the releases into a MacOS one and Linux/Windows one
This is to add support for building the MacOS binary using CGO.
This commit is contained in:
parent
0c541da1c6
commit
55b8103416
4 changed files with 74 additions and 26 deletions
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
|
|
@ -11,7 +11,6 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
localstack:
|
||||
image: localstack/localstack
|
||||
|
|
|
|||
46
.github/workflows/release.yaml
vendored
46
.github/workflows/release.yaml
vendored
|
|
@ -4,10 +4,9 @@ on:
|
|||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: macos-12
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
localstack:
|
||||
image: localstack/localstack
|
||||
|
|
@ -32,12 +31,51 @@ jobs:
|
|||
go test -p 1 ./...
|
||||
env:
|
||||
GOPRIVATE: "github:com/lmika/*"
|
||||
|
||||
release-macos:
|
||||
needs: build
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Configure
|
||||
run: |
|
||||
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
||||
- name: Setup Goreleaser
|
||||
run: |
|
||||
brew install goreleaser/tap/goreleaser
|
||||
brew install goreleaser
|
||||
- name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
goreleaser release -f macos.goreleaser.yml --snapshot --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
||||
|
||||
release-linux:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Configure
|
||||
run: |
|
||||
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/lmika".insteadOf "https://github.com/lmika"
|
||||
- name: Release
|
||||
uses: goreleaser/goreleaser-action@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
version: latest
|
||||
args: release --skip-validate --rm-dist
|
||||
args: release --skip-validate --rm-dist --skip-publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
HOMEBREW_GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue