mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-10 07:10:31 +00:00
fix(ci): standardise binary names
This commit is contained in:
parent
845b4003e7
commit
01169cf71d
22
.github/workflows/go.yml
vendored
22
.github/workflows/go.yml
vendored
@ -33,17 +33,21 @@ jobs:
|
||||
|
||||
- name: Build binary on Linux and macOS
|
||||
if: matrix.os != 'windows-latest'
|
||||
env:
|
||||
OS: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
|
||||
GOOS: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}
|
||||
GOARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
GOOS=${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }} \
|
||||
GOARCH=${{ matrix.arch }} \
|
||||
go build -o fabric-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }} .
|
||||
go build -o fabric-${OS}-${{ matrix.arch }}-${{ github.ref_name }} .
|
||||
|
||||
- name: Build binary on Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
env:
|
||||
OS: windows
|
||||
GOOS: windows
|
||||
GOARCH: ${{ matrix.arch }}
|
||||
run: |
|
||||
$env:GOOS = 'windows'
|
||||
$env:GOARCH = '${{ matrix.arch }}'
|
||||
go build -o fabric-${{ matrix.os }}-${{ matrix.arch }}-${{ github.ref_name }} .
|
||||
go build -o fabric-${OS}-${{ matrix.arch }}-${{ github.ref_name }} .
|
||||
|
||||
- name: Create DMG for macOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
@ -64,8 +68,4 @@ jobs:
|
||||
- name: Upload release artifact
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
|
||||
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
|
||||
gh release upload ${{ github.ref_name }} fabric-*-${{ matrix.arch }}-${{ github.ref_name }}*
|
||||
|
Loading…
Reference in New Issue
Block a user