Skip to content

Commit

Permalink
Fix build workflow to support macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Sep 27, 2024
1 parent 10d9aef commit e1f47a6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set Up Elixir
# Set up Elixir and Erlang/OTP
- name: Set Up Elixir (Ubuntu and Windows)
if: runner.os != 'macOS'
uses: erlef/setup-beam@v1
with:
elixir-version: "1.17.2"
otp-version: "26"

- name: Set Up Elixir (macOS)
if: runner.os == 'macOS'
uses: actions/setup-elixir@v1
with:
elixir-version: "1.17.2"
otp-version: "26"

- name: Install Dependencies
run: mix deps.get

Expand All @@ -40,12 +49,12 @@ jobs:
MIX_ENV: prod
run: mix release

- name: Prepare Artifact
if: ${{ runner.os != 'Windows' }}
- name: Prepare Artifact (Linux and macOS)
if: runner.os != 'Windows'
run: |
tar czvf cashubrew-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz -C _build/prod/rel/cashubrew .
- name: Prepare Artifact (Windows)
if: ${{ runner.os == 'Windows' }}
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path "_build\prod\rel\cashubrew\*" -DestinationPath "cashubrew-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }}.zip"
Expand Down

0 comments on commit e1f47a6

Please sign in to comment.