From d68add56b4a64fb8520e1f7fcb0659bc2d8df997 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Sun, 18 Jun 2023 12:43:17 +0200 Subject: [PATCH 1/2] Add macOS artifacts to GitHub releases This fix https://github.com/input-output-hk/foliage/issues/62 but require https://github.com/input-output-hk/foliage/issues/47 to be addressed first! --- .github/workflows/release.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea0f4d4..4d30b76 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,11 @@ on: jobs: build-and-release: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + runs-on: ${{ matrix.os }} permissions: contents: write @@ -20,9 +24,16 @@ jobs: uses: cachix/install-nix-action@v20 - name: Build - run: nix build .#packages.x86_64-linux.default --accept-flake-config - + run: | + if [[ "${{ matrix.os }}" == "macos-latest" ]]; then + nix build .#packages.x86_64-darwin.default --accept-flake-config + else + nix build .#packages.x86_64-linux.default --accept-flake-config + fi + - name: Create Release and Upload Release Assets uses: ncipollo/release-action@v1 with: - artifacts: ./result/bin/foliage + artifacts: "result/bin/*" + token: ${{ secrets.GITHUB_TOKEN }} + draft: false From 317cabf8e009fadd71e9b71ed6ff46a2a39bdb19 Mon Sep 17 00:00:00 2001 From: Yvan Sraka Date: Tue, 20 Jun 2023 11:57:17 +0200 Subject: [PATCH 2/2] Update release.yml --- .github/workflows/release.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d30b76..cc48f04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,12 +24,7 @@ jobs: uses: cachix/install-nix-action@v20 - name: Build - run: | - if [[ "${{ matrix.os }}" == "macos-latest" ]]; then - nix build .#packages.x86_64-darwin.default --accept-flake-config - else - nix build .#packages.x86_64-linux.default --accept-flake-config - fi + run: nix build .# --accept-flake-config - name: Create Release and Upload Release Assets uses: ncipollo/release-action@v1