Merge pull request #6 from ReenigneArcher/add-build-checks

Update create_package.yml
This commit is contained in:
ReenigneArcher 2022-01-11 18:20:41 -05:00 committed by GitHub
commit 2c0873332c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,9 +9,25 @@ on:
workflow_dispatch:
jobs:
check_changelog:
name: Check Changelog
runs-on: ubuntu-latest
steps:
- name: Verify Changelog
id: verify_changelog
if: ${{ github.ref == 'refs/heads/master' }}
uses: SunshineStream/actions/verify_changelog@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
next_version: ${{ steps.verify_changelog.outputs.changelog_parser_version }}
last_version: ${{ steps.verify_changelog.outputs.latest_release_tag_name }}
release_body: ${{ steps.verify_changelog.outputs.changelog_parser_description }}
build_appimage:
name: AppImage
runs-on: ubuntu-20.04
needs: check_changelog
steps:
- name: Checkout
@ -87,14 +103,19 @@ jobs:
name: sunshine-AppImage
path: artifacts/
- name: Create Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: SunshineStream/actions/create_release@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
next_version: ${{ needs.check_changelog.outputs.next_version }}
last_version: ${{ needs.check_changelog.outputs.last_version }}
release_body: ${{ needs.check_changelog.outputs.release_body }}
build_linux:
name: Linux
runs-on: ubuntu-20.04
needs: check_changelog
strategy:
fail-fast: true # false to test all, true to fail entire job if any fail
matrix:
@ -138,10 +159,14 @@ jobs:
uses: SunshineStream/actions/create_release@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
next_version: ${{ needs.check_changelog.outputs.next_version }}
last_version: ${{ needs.check_changelog.outputs.last_version }}
release_body: ${{ needs.check_changelog.outputs.release_body }}
build_win:
name: Windows
runs-on: windows-2019
needs: check_changelog
steps:
- name: Checkout
@ -176,7 +201,7 @@ jobs:
- name: Package Windows
run: |
cd sunshine-windows-build
Del ..\assets\apps_linux.json
del ..\assets\apps_linux.json
7z a Sunshine-Windows.zip ..\assets
7z a Sunshine-Windows.zip sunshine.exe
7z a Sunshine-Windows.zip tools\dxgi-info.exe
@ -186,7 +211,7 @@ jobs:
7z a Sunshine-Windows.zip ..\tools\uninstall-service.bat
cd ..
mkdir artifacts
move "sunshine-windows-build/Sunshine-Windows.zip" "artifats"
move "sunshine-windows-build\Sunshine-Windows.zip" "artifacts"
- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v2
@ -194,6 +219,10 @@ jobs:
name: sunshine-${{ runner.os }}
path: artifacts/
- name: Create Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: SunshineStream/actions/create_release@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
next_version: ${{ needs.check_changelog.outputs.next_version }}
last_version: ${{ needs.check_changelog.outputs.last_version }}
release_body: ${{ needs.check_changelog.outputs.release_body }}