Skip to content

Commit

Permalink
update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszgasior committed Jun 23, 2024
1 parent 12ebb54 commit 578bf35
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
extension: ""
- os: macos-latest
goos: darwin
goarch: amd64
extension: ""
- os: windows-latest
goos: windows
goarch: amd64
extension: ".exe"

steps:
- name: Checkout repository
Expand All @@ -23,30 +36,15 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.20

- name: Build application
run: |
go build -o git-remove-branches main.go
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o git-remove-branches${{ matrix.extension }} main.go
- name: Archive production artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: remove-branches-linux
path: git-remove-branches

- name: Archive production artifacts
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: remove-branches-macos
path: git-remove-branches

- name: Archive production artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: remove-branches-windows
path: git-remove-branches.exe
name: remove-branches-${{ matrix.goos }}-${{ matrix.goarch }}
path: git-remove-branches${{ matrix.extension }}

0 comments on commit 578bf35

Please sign in to comment.