Skip to content

Commit

Permalink
update release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
2start committed Jan 16, 2024
1 parent d93acc8 commit 8448e0c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

jobs:
build:
name: Build and Release
name: Build for macOS ARM
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64]
goos: [darwin]
goarch: [arm64]
steps:
- name: Set up Go
uses: actions/setup-go@v3
Expand All @@ -24,16 +24,14 @@ jobs:

- name: Build binary
run: |
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o "gptprep-${{ matrix.goos }}-${{ matrix.goarch }}"
if [ "${{ matrix.goos }}" = "windows" ]; then
mv "gptprep-${{ matrix.goos }}-${{ matrix.goarch }}" "gptprep-${{ matrix.goos }}-${{ matrix.goarch }}.exe"
fi
BINARY_NAME="gptprep-${{ matrix.goos }}-${{ matrix.goarch }}"
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o "${BINARY_NAME}"
- name: Archive binary
uses: actions/upload-artifact@v3
with:
name: gptprep-${{ matrix.goos }}-${{ matrix.goarch }}
path: gptprep-${{ matrix.goos }}-${{ matrix.goarch }}*
path: gptprep-${{ matrix.goos }}-${{ matrix.goarch }}

release:
name: Create Release
Expand All @@ -48,7 +46,7 @@ jobs:
with:
path: artifacts

- name: Release
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
Expand Down

0 comments on commit 8448e0c

Please sign in to comment.