Skip to content

Commit

Permalink
FIx executable extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
keybraker committed Feb 24, 2024
1 parent ae7218b commit ef00558
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
OS: [linux, windows, macos]
ARCH: [amd64]
include:
- OS: linux
ARCH: amd64
EXT: "bin"
- OS: windows
ARCH: amd64
EXT: "exe"
- OS: macos
ARCH: amd64
EXT: "app"
steps:
- uses: actions/checkout@v4

Expand All @@ -24,23 +32,17 @@ jobs:
- name: Build
run: |
GOOS=${{ matrix.OS }} GOARCH=${{ matrix.ARCH }}
EXT=""
if [ "$GOOS" = "windows" ]; then
EXT=".exe"
elif [ "$GOOS" = "linux" ]; then
EXT=".bin"
elif [ "$GOOS" = "macos" ]; then
EXT=""
fi
go build -v -o mediarizer2-${{ matrix.OS }}-${{ matrix.ARCH }}$EXT ./app
# run: |
# env GOOS=${{ matrix.OS }} GOARCH=${{ matrix.ARCH }} go build -v -o mediarizer2-${{ matrix.ARCH }}-${{ matrix.OS }} ./app
go build -v -o mediarizer2-${{ matrix.OS }}-${{ matrix.ARCH }}.${{ matrix.EXT }} ./app
env:
GOOS: ${{ matrix.OS }}
GOARCH: ${{ matrix.ARCH }}
EXT: ${{ matrix.EXT }}

- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: mediarizer2-${{ matrix.ARCH }}-${{ matrix.OS }}
path: mediarizer2-${{ matrix.ARCH }}-${{ matrix.OS }}
name: mediarizer2-${{ matrix.ARCH }}-${{ matrix.OS }}.${{ matrix.EXT }}
path: mediarizer2-${{ matrix.ARCH }}-${{ matrix.OS }}.${{ matrix.EXT }}

release:
needs: build
Expand Down

0 comments on commit ef00558

Please sign in to comment.