From 53917ec8f204fa073eec8612bace2598a867b5a3 Mon Sep 17 00:00:00 2001 From: redtide Date: Tue, 20 Feb 2024 13:47:00 +0100 Subject: [PATCH] CI: simplified if conditional expressions, added release-test branch release-test branch is intended to be used on a user repository, not upstream, to test builds before tagging. --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b72e05d6..f43975d1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -105,7 +105,7 @@ jobs: ninja-build \ libjack-jackd2-dev - name: Install abseil - if: ${{ github.ref_type == 'branch' }} + if: github.ref_type == 'branch' run: | sudo apt-get install \ libabsl-dev \ @@ -160,13 +160,13 @@ jobs: ) cmake "${options[@]}" - name: Create tarball - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' run: | DESTDIR="$(pwd)/${{ env.install_name }}" \ cmake --build build --config ${{ env.build_type }} --target install tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}" - name: Upload - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' uses: actions/upload-artifact@v3 with: name: Linux tarball @@ -184,7 +184,7 @@ jobs: with: submodules: recursive - name: Install dependencies - if: ${{ github.ref_type == 'branch' }} + if: github.ref_type == 'branch' run: brew install abseil - name: Configure CMake run: | @@ -233,13 +233,13 @@ jobs: ) cmake "${options[@]}" - name: Create tarball - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' run: | DESTDIR="$(pwd)/${{ env.install_name }}" \ cmake --build build --config ${{ env.build_type }} --target install tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}" - name: Upload - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' uses: actions/upload-artifact@v3 with: name: macOS tarball @@ -299,17 +299,17 @@ jobs: --parallel 2 ` --verbose ` - name: Create zip package - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' run: 7z a "${{ env.install_name }}.zip" ".\build\library\*" - name: Upload - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' uses: actions/upload-artifact@v3 with: name: ${{ matrix.pkg_platform }} zip package path: "${{ github.workspace }}/${{ env.install_name }}.zip" archive_source_code: - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' || github.ref_name == 'release-test' name: Source code archive runs-on: ubuntu-20.04 timeout-minutes: 2 @@ -415,12 +415,12 @@ jobs: make -C "${{ github.workspace }}" -f simple.mk deploy: - if: ${{ github.ref_type == 'tag' }} + if: github.ref_type == 'tag' runs-on: ubuntu-20.04 needs: - build_for_linux - build_for_macos - # - build_for_mod + # build_for_mod - build_for_windows - archive_source_code steps: