chore: separate darwin build configuration into .goreleaser-darwin.yaml and update action
This commit is contained in:
58
.github/workflows/release.yaml
vendored
58
.github/workflows/release.yaml
vendored
@@ -9,7 +9,7 @@ permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
release-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -20,21 +20,16 @@ jobs:
|
||||
with:
|
||||
go-version: "1.25.0"
|
||||
|
||||
- name: build linux binaries
|
||||
- name: release linux
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: "~> v2"
|
||||
args: build --clean --id linux
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: upload linux artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-dist
|
||||
path: dist/
|
||||
|
||||
build-darwin:
|
||||
release-darwin:
|
||||
needs: release-linux
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -45,49 +40,10 @@ jobs:
|
||||
with:
|
||||
go-version: "1.25.0"
|
||||
|
||||
- name: build darwin binaries
|
||||
- name: release darwin
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: "~> v2"
|
||||
args: build --clean --id darwin
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: upload darwin artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: darwin-dist
|
||||
path: dist/
|
||||
|
||||
release:
|
||||
needs: [build-linux, build-darwin]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: "1.25.0"
|
||||
|
||||
- name: download linux artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux-dist
|
||||
path: dist/
|
||||
|
||||
- name: download darwin artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: darwin-dist
|
||||
path: dist/
|
||||
merge-multiple: true
|
||||
|
||||
- name: release
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: "~> v2"
|
||||
args: release --clean --skip=build
|
||||
args: release --clean --config .goreleaser-darwin.yaml --skip=validate
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user