Skip to content

Commit

Permalink
Fix target architectures in release build
Browse files Browse the repository at this point in the history
  • Loading branch information
L7R7 committed Jun 24, 2024
1 parent 3393a7e commit 1936f4b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,24 @@ jobs:

build_artifact:
needs: [create_release]
name: ${{ matrix.os }}/${{ matrix.target }}/${{ github.ref }}
name: ${{ matrix.os }}/${{ matrix.arch }}/${{ github.ref }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
arch: aarch64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
arch: x86_64
- os: macOS-latest
target: universal-apple-darwin
arch: aarch64
- os: macOS-latest
target: aarch64-apple-darwin
- os: macOS-13
target: x86_64-apple-darwin
arch: x86_64
- os: windows-latest
arch: x86_64
- os: windows-latest
arch: aarch64

steps:
- name: Check out code
Expand All @@ -74,14 +75,14 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-9.6.5-${{ matrix.target }}-${{ hashFiles('**/stack.yaml.lock','**/gitlab-helper.cabal') }}-v2
key: ${{ runner.os }}-9.6.5-${{ matrix.arch }}-${{ hashFiles('**/stack.yaml.lock','**/gitlab-helper.cabal') }}-v2
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-9.6.5-
${{ runner.os }}-${{ matrix.arch }}-9.6.5-
- name: Build binary
run: |
mkdir bin
stack build --copy-bins --local-bin-path bin
stack build --copy-bins --local-bin-path bin --arch ${{ matrix.arch }}
- if: matrix.os == 'windows-latest'
name: Set binary path name on Windows
Expand Down Expand Up @@ -120,5 +121,5 @@ jobs:
with:
upload_url: ${{ env.upload_url }}
asset_path: ${{ env.BINARY_PATH }}
asset_name: gitlab-helper-${{ steps.tag.outputs.tag }}-${{ runner.os }}-${{ matrix.target }}${{ env.EXT }}
asset_name: gitlab-helper-${{ steps.tag.outputs.tag }}-${{ runner.os }}-${{ matrix.arch }}${{ env.EXT }}
asset_content_type: application/octet-stream

0 comments on commit 1936f4b

Please sign in to comment.