Package based on strategy matrix

This commit is contained in:
ReenigneArcher 2022-01-11 09:46:18 -05:00
parent 0cad1bf6a5
commit 4c6a0cdc37

View File

@ -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 }}