From c9df58e3c14c85aa7c35411a5cc119614c9ec9a9 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Mon, 1 May 2023 20:07:32 +0300 Subject: [PATCH] Workflows: Remove set-output and fix cx_freeze_zip checkout --- .github/workflows/release-tests.yml | 67 +++++++++------------------ .github/workflows/release.yml | 70 ++++++++++++++--------------- 2 files changed, 56 insertions(+), 81 deletions(-) diff --git a/.github/workflows/release-tests.yml b/.github/workflows/release-tests.yml index 6808469a..542d0b43 100644 --- a/.github/workflows/release-tests.yml +++ b/.github/workflows/release-tests.yml @@ -23,10 +23,10 @@ jobs: shell: bash run: | tag_abbrev=$(git tag | sort -h | grep -oE "(^[0-9]+\.[0-9]+(.[0-9]+)?)$" | tail -1) - echo "::set-output name=tag_abbrev::$tag_abbrev" - echo "::set-output name=tag_offset::$(git rev-list $tag_abbrev..HEAD --count)" - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - echo "::set-output name=full_desc::$(git describe --long --tags)" + echo "tag_abbrev=$tag_abbrev" >> $GITHUB_OUTPUT + echo "tag_offset=$(git rev-list $tag_abbrev..HEAD --count)" >> $GITHUB_OUTPUT + echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "full_desc=$(git describe --long --tags)" >> $GITHUB_OUTPUT deb-package: needs: version @@ -53,7 +53,7 @@ jobs: - name: Upload to Artifacts uses: actions/upload-artifact@v3 with: - name: Rare.deb + name: Rare-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.deb path: build/Rare.deb appimage: @@ -75,44 +75,18 @@ jobs: cp rare/__main__.py . appimage-builder --skip-test mv Rare-*.AppImage Rare.AppImage + mv Rare-*.AppImage.zsync Rare.AppImage.zsync - name: Upload to Artifacts uses: actions/upload-artifact@v3 with: - name: Rare.AppImage + name: Rare-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.AppImage path: Rare.AppImage - - cx_freeze_zip: - needs: version - runs-on: "windows-latest" - steps: - - uses: actions/checkout@v3 - with: - ref: "release" - - uses: actions/setup-python@v4 - with: - cache: pip - python-version: '3.11' - check-latest: true - architecture: x64 - - name: Install build dependencies - run: pip3 install cx_freeze - - name: Install target dependencies - run: | - pip3 install -r requirements.txt - pip3 install -r requirements-presence.txt - pip3 install . - - name: Build - run: cxfreeze -c rare/__main__.py --target-dir dist --target-name rare --icon rare/resources/images/Rare.ico -OO --base-name Win32GUI - - name: Compress - run: | - python -c "import shutil; shutil.make_archive('Rare-Windows', 'zip', 'dist')" - - - name: Upload to Artifacts + - name: Upload to Artifacts (zsync) uses: actions/upload-artifact@v3 with: - name: Rare-Windows-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.zip - path: Rare-Windows.zip + name: Rare-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.AppImage.zsync + path: Rare.AppImage.zsync nuitka: if: ${{ false }} @@ -124,8 +98,8 @@ jobs: with: cache: pip python-version: '3.9' - architecture: x64 check-latest: true + architecture: x64 - name: Install build dependencies run: pip3 install nuitka ordered-set - name: Install target dependencies @@ -173,7 +147,7 @@ jobs: name: Rare-Windows-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} path: rare.dist - cx_freeze: + cx_freeze_msi: needs: version runs-on: "windows-latest" steps: @@ -199,18 +173,18 @@ jobs: uses: actions/upload-artifact@v3 with: name: Rare-Windows-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.msi - path: dist/*.msi + path: dist/Rare-Windows.msi - win-zip: + cx_freeze_zip: needs: version runs-on: "windows-latest" steps: - uses: actions/checkout@v3 - with: - ref: "release" - uses: actions/setup-python@v4 with: - python-version: '3.9' + cache: pip + python-version: '3.11' + check-latest: true architecture: x64 - name: Install build dependencies run: pip3 install cx_freeze @@ -218,6 +192,7 @@ jobs: run: | pip3 install -r requirements.txt pip3 install -r requirements-presence.txt + pip3 install . - name: Build run: cxfreeze -c rare/__main__.py --target-dir dist --target-name rare --icon rare/resources/images/Rare.ico -OO --base-name Win32GUI - name: Compress @@ -259,9 +234,9 @@ jobs: - name: Create dmg run: | git clone https://github.com/create-dmg/create-dmg - create-dmg/create-dmg Rare-${{github.ref}}.dmg dist/Rare.App --volname Rare --volicon rare/resources/images/Rare.icns + create-dmg/create-dmg Rare.dmg dist/Rare.App --volname Rare --volicon rare/resources/images/Rare.icns - uses: actions/upload-artifact@v3 with: - name: Rare-MacOS.dmg - path: ./*.dmg + name: Rare-${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}.dmg + path: Rare.dmg diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 51229c02..b5453220 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,7 +91,7 @@ jobs: asset_name: Rare-${{ github.event.release.tag_name }}.AppImage tag: ${{ github.ref }} overwrite: true - - name: Upload zsync file to GitHub + - name: Upload to Releases (zsync) uses: svenstaro/upload-release-action@2.2.1 with: repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -100,40 +100,6 @@ jobs: tag: ${{ github.ref }} overwrite: true - cx_freeze_zip: - runs-on: "windows-latest" - steps: - - uses: actions/checkout@v3 - with: - ref: "release" - - uses: actions/setup-python@v4 - with: - cache: pip - python-version: '3.11' - check-latest: true - architecture: x64 - - name: Install build dependencies - run: pip3 install cx_freeze - - name: Install target dependencies - run: | - pip3 install -r requirements.txt - pip3 install -r requirements-presence.txt - pip3 install . - - name: Build - run: cxfreeze -c rare/__main__.py --target-dir dist --target-name rare --icon rare/resources/images/Rare.ico -OO --base-name Win32GUI - - name: Compress - run: | - python -c "import shutil; shutil.make_archive('Rare-Windows', 'zip', 'dist')" - - - name: Upload to Releases - uses: svenstaro/upload-release-action@2.2.1 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: Rare-Windows.zip - asset_name: Rare-Windows-${{ github.event.release.tag_name }}.zip - tag: ${{ github.ref }} - overwrite: true - nuitka: if: ${{ false }} runs-on: "windows-latest" @@ -232,6 +198,40 @@ jobs: tag: ${{ github.ref }} overwrite: true + cx_freeze_zip: + runs-on: "windows-latest" + steps: + - uses: actions/checkout@v3 + with: + ref: "release" + - uses: actions/setup-python@v4 + with: + cache: pip + python-version: '3.11' + check-latest: true + architecture: x64 + - name: Install build dependencies + run: pip3 install cx_freeze + - name: Install target dependencies + run: | + pip3 install -r requirements.txt + pip3 install -r requirements-presence.txt + pip3 install . + - name: Build + run: cxfreeze -c rare/__main__.py --target-dir dist --target-name rare --icon rare/resources/images/Rare.ico -OO --base-name Win32GUI + - name: Compress + run: | + python -c "import shutil; shutil.make_archive('Rare-Windows', 'zip', 'dist')" + + - name: Upload to Releases + uses: svenstaro/upload-release-action@2.2.1 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: Rare-Windows.zip + asset_name: Rare-Windows-${{ github.event.release.tag_name }}.zip + tag: ${{ github.ref }} + overwrite: true + mac_os: runs-on: macos-latest steps: