Skip to content

Commit

Permalink
Workflows: Remove set-output and fix cx_freeze_zip checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed May 3, 2023
1 parent 82128e3 commit c9df58e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 81 deletions.
67 changes: 21 additions & 46 deletions .github/workflows/release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -199,25 +173,26 @@ 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
- 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
Expand Down Expand Up @@ -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
70 changes: 35 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c9df58e

Please sign in to comment.