From b20477126bc05fa7625c0de507657c3492bab1de Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Sun, 7 Nov 2021 17:42:31 +0100 Subject: [PATCH 1/2] Separate build from release --- .github/workflows/listener-build-linux.yml | 25 ++++++++++++------- .github/workflows/listener-build-macosx.yml | 26 +++++++++++++------- .github/workflows/listener-build-windows.yml | 23 +++++++++++------ 3 files changed, 48 insertions(+), 26 deletions(-) diff --git a/.github/workflows/listener-build-linux.yml b/.github/workflows/listener-build-linux.yml index 24f03a4f9..ff8c89a1b 100644 --- a/.github/workflows/listener-build-linux.yml +++ b/.github/workflows/listener-build-linux.yml @@ -1,9 +1,6 @@ name: build-listener-linux -on: - push: - tags: - - "*.*.*" +on: push jobs: build: @@ -26,8 +23,7 @@ jobs: cabal-version: ${{ matrix.cabal }} - name: Freeze - run: | - cabal freeze + run: cabal freeze - name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle uses: actions/cache@v2 @@ -120,7 +116,18 @@ jobs: cd tidal-listener/ tar cvfj binary.tar binary/* - - name: release - uses: softprops/action-gh-release@v1 + - uses: actions/upload-artifact@v2 + with: + path: tidal-listener/binary.tar + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/download-artifact@v2 + - run: ls */* + + - uses: softprops/action-gh-release@v1 with: - files: tidal-listener/binary.tar \ No newline at end of file + files: artifact/binary.tar \ No newline at end of file diff --git a/.github/workflows/listener-build-macosx.yml b/.github/workflows/listener-build-macosx.yml index 5ff079bd5..a7340fd12 100644 --- a/.github/workflows/listener-build-macosx.yml +++ b/.github/workflows/listener-build-macosx.yml @@ -1,9 +1,6 @@ name: build-listener-macosx -on: - push: - tags: - - "*.*.*" +on: push jobs: build: @@ -88,7 +85,7 @@ jobs: cd tidal-listener/binary/haskell-libs/ghc-packages rm -r ghc-${{ matrix.ghc }} rm -r Cabal-* - rm -R rts + rm -r rts - name: fake gcc run: | @@ -106,9 +103,20 @@ jobs: - name: zip files run: | cd tidal-listener/ - tar cvfj macOS.tar binary/* + tar cvfj macosx.tar binary/* - - name: Release - uses: softprops/action-gh-release@v1 + - uses: actions/upload-artifact@v2 with: - files: tidal-listener/macOS.tar \ No newline at end of file + path: tidal-listener/macosx.tar + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/download-artifact@v2 + - run: ls */* + + - uses: softprops/action-gh-release@v1 + with: + files: artifact/macosx.tar \ No newline at end of file diff --git a/.github/workflows/listener-build-windows.yml b/.github/workflows/listener-build-windows.yml index 99f46fc39..bb3bda92e 100644 --- a/.github/workflows/listener-build-windows.yml +++ b/.github/workflows/listener-build-windows.yml @@ -1,9 +1,6 @@ name: build-listener-windows -on: - push: - tags: - - "*.*.*" +on: push jobs: build: @@ -87,8 +84,18 @@ jobs: - name: zip files run: Compress-Archive -LiteralPath 'tidal-listener\binary\' -DestinationPath 'tidal-listener\windows.zip' - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + - uses: actions/upload-artifact@v2 with: - files: 'tidal-listener\windows.zip' \ No newline at end of file + path: tidal-listener\windows.zip + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/download-artifact@v2 + - run: ls */* + + - uses: softprops/action-gh-release@v1 + with: + files: artifact/windows.zip \ No newline at end of file From 8aa2df7a4a544d23c488d597b6f27d39f8c09ba1 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Sun, 7 Nov 2021 18:49:37 +0100 Subject: [PATCH 2/2] Execute listener build also on pull request --- .github/workflows/listener-build-linux.yml | 2 +- .github/workflows/listener-build-macosx.yml | 2 +- .github/workflows/listener-build-windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/listener-build-linux.yml b/.github/workflows/listener-build-linux.yml index ff8c89a1b..be249501d 100644 --- a/.github/workflows/listener-build-linux.yml +++ b/.github/workflows/listener-build-linux.yml @@ -1,6 +1,6 @@ name: build-listener-linux -on: push +on: [push, pull_request] jobs: build: diff --git a/.github/workflows/listener-build-macosx.yml b/.github/workflows/listener-build-macosx.yml index a7340fd12..8ffa2f0d2 100644 --- a/.github/workflows/listener-build-macosx.yml +++ b/.github/workflows/listener-build-macosx.yml @@ -1,6 +1,6 @@ name: build-listener-macosx -on: push +on: [push, pull_request] jobs: build: diff --git a/.github/workflows/listener-build-windows.yml b/.github/workflows/listener-build-windows.yml index bb3bda92e..85a57cc4a 100644 --- a/.github/workflows/listener-build-windows.yml +++ b/.github/workflows/listener-build-windows.yml @@ -1,6 +1,6 @@ name: build-listener-windows -on: push +on: [push, pull_request] jobs: build: