fix(ci): standardise binary names

pull/810/head
Robert Sturla 1 month ago
parent 845b4003e7
commit 01169cf71d
No known key found for this signature in database

@ -33,17 +33,21 @@ jobs:
- name: Build binary on Linux and macOS - name: Build binary on Linux and macOS
if: matrix.os != 'windows-latest' if: matrix.os != 'windows-latest'
env:
OS: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
GOOS: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
GOARCH: ${{ matrix.arch }}
run: | run: |
GOOS=${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }} \ go build -o fabric-${OS}-${{ matrix.arch }}-${{ github.ref_name }} .
GOARCH=${{ matrix.arch }} \
go build -o fabric-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }} .
- name: Build binary on Windows - name: Build binary on Windows
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
env:
OS: windows
GOOS: windows
GOARCH: ${{ matrix.arch }}
run: | run: |
$env:GOOS = 'windows' go build -o fabric-${OS}-${{ matrix.arch }}-${{ github.ref_name }} .
$env:GOARCH = '${{ matrix.arch }}'
go build -o fabric-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }} .
- name: Create DMG for macOS - name: Create DMG for macOS
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
@ -64,8 +68,4 @@ jobs:
- name: Upload release artifact - name: Upload release artifact
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: | run: |
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then gh release upload ${{ github.ref_name }} fabric-*-${{ matrix.arch }}-${{ github.ref_name }}*
gh release upload ${{ github.ref_name }} fabric-macos-${{ matrix.arch }}-${{ github.ref_name }}.dmg
else
gh release upload ${{ github.ref_name }} fabric-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }}*
fi

Loading…
Cancel
Save