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
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 }}
|
|
@ -3,8 +3,6 @@ builds:
|
|||
targets:
|
||||
- windows_amd64
|
||||
- linux_amd64
|
||||
- darwin_amd64
|
||||
- darwin_arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
main: ./cmd/dynamo-browse/.
|
||||
|
@ -19,8 +17,6 @@ archives:
|
|||
format: zip
|
||||
- goos: linux
|
||||
format: tar.gz
|
||||
- goos: macos
|
||||
format: tar.gz
|
||||
nfpms:
|
||||
- id: package_nfpms
|
||||
package_name: audax
|
||||
|
@ -35,23 +31,7 @@ nfpms:
|
|||
- deb
|
||||
- rpm
|
||||
bindir: /usr/local/bin
|
||||
brews:
|
||||
- name: audax
|
||||
tap:
|
||||
owner: lmika
|
||||
name: homebrew-audax
|
||||
token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"
|
||||
folder: Formula
|
||||
homepage: https://audax.tools
|
||||
description: TUI tools for AWS administration
|
||||
license: MIT
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
31
macos.goreleaser.yml
Normal file
31
macos.goreleaser.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
builds:
|
||||
- id: dynamo-browse
|
||||
targets:
|
||||
- darwin_amd64
|
||||
- darwin_arm64
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
main: ./cmd/dynamo-browse/.
|
||||
binary: dynamo-browse
|
||||
archives:
|
||||
- id: zip
|
||||
builds:
|
||||
- dynamo-browse
|
||||
wrap_in_directory: true
|
||||
format_overrides:
|
||||
- goos: macos
|
||||
format: tar.gz
|
||||
brews:
|
||||
- name: audax
|
||||
tap:
|
||||
owner: lmika
|
||||
name: homebrew-audax
|
||||
token: "{{ .Env.HOMEBREW_GITHUB_TOKEN }}"
|
||||
folder: Formula
|
||||
homepage: https://audax.tools
|
||||
description: TUI tools for AWS administration
|
||||
license: MIT
|
||||
checksum:
|
||||
name_template: 'checksums-macos.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
Loading…
Reference in a new issue