From 592cb002bd542b30da11db76f5d62da86144214c Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 23 Jan 2022 18:20:37 -0500 Subject: [PATCH] Add version test - Add version test on push or PR targets to master branch (AppImage only) --- .github/workflows/create_package.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/create_package.yml b/.github/workflows/create_package.yml index 74e48f5d..b0d896ce 100644 --- a/.github/workflows/create_package.yml +++ b/.github/workflows/create_package.yml @@ -100,6 +100,19 @@ jobs: run: | cd appimage_temp wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage && chmod +x appimagelint-x86_64.AppImage && ./appimagelint-x86_64.AppImage ./sunshine/sunshine.AppImage + - name: Check Version + if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }} + # base_ref for pull request check, ref for push + run: | + cd ./appimage_temp/sunshine + version=$(./sunshine.AppImage --version | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') + echo "sunshine_version=v${version}" >> $GITHUB_ENV + - name: Compare Versions + if: ${{ ( github.ref == 'refs/heads/master' || github.base_ref == 'master') && ( env.sunshine_version != needs.check_changelog.outputs.next_version ) }} + run: | + echo AppImage version: "$sunshine_version" + echo Changelog version: "${{ needs.check_changelog.outputs.next_version }}" + exit 1 - name: Upload Artifacts if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} uses: actions/upload-artifact@v2