From 4c6a0cdc377c6b1a03a9acff87bcd1144804ede7 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Tue, 11 Jan 2022 09:46:18 -0500 Subject: [PATCH] Package based on strategy matrix --- .github/workflows/create_package.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create_package.yml b/.github/workflows/create_package.yml index 1a98d11b..6829ce60 100644 --- a/.github/workflows/create_package.yml +++ b/.github/workflows/create_package.yml @@ -98,7 +98,13 @@ jobs: strategy: fail-fast: false matrix: - distro: [ debian, fedora_33, fedora_35, ubuntu_18_04, ubuntu_20_04, ubuntu_21_04, ubuntu_21_10 ] + distro: [ debian, ubuntu_18_04, ubuntu_20_04, ubuntu_21_04, ubuntu_21_10 ] + package: [ -p ] + include: + - distro: fedora_33 + package: '' + - distro: fedora_35 + package: '' steps: - name: Checkout @@ -115,20 +121,20 @@ jobs: - name: Build Linux run: | cd scripts - sudo ./build-sunshine.sh -p -u -n sunshine-${{ matrix.distro }} -s .. + sudo ./build-sunshine.sh ${{ matrix.package }} -u -n sunshine-${{ matrix.distro }} -s .. - name: Package Linux - if: ${{ matrix.distro != 'fedora_33' && matrix.distro != 'fedore_35' }} + if: ${{ matrix.package == '-p' }} run: | cd scripts sudo mv ./sunshine-${{ matrix.distro }}-build/sunshine-${{ matrix.distro }}.deb ../artifacts/ - name: Upload Artifacts - if: ${{ ( matrix.distro != 'fedora_33' && matrix.distro != 'fedore_35' ) && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }} + if: ${{ matrix.package == '-p' && ( github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' ) }} uses: actions/upload-artifact@v2 with: name: sunshine-${{ matrix.distro }} path: artifacts/ - name: Create Release - if: ${{ ( matrix.distro != 'fedora_33' && matrix.distro != 'fedore_35' ) && ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }} + if: ${{ matrix.package == '-p' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} uses: SunshineStream/actions/create_release@v0 with: token: ${{ secrets.GITHUB_TOKEN }}