Fix folders inside zip #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check-out repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Install your Dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Build Executable with Nuitka | |
uses: Nuitka/Nuitka-Action@main | |
env: | |
DEBUG_COMPILATION: yes | |
with: | |
nuitka-version: main | |
script-name: ytm2spt.py | |
enable-plugins: pyside6 | |
user-package-configuration-file: ytmusicapi.nuitka-package.config.yaml | |
- name: lowercase the runner OS name | |
run: echo ::set-env name=RUNNER_OS::${${{ runner.os }},,} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ytm2spt-${{ env.RUNNER_OS }}-build | |
path: | # match what's created for the 3 OSes | |
build/*.exe | |
build/*.bin | |
build/*.app/**/* | |
overwrite: true | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
- run: ls -R | |
- name: Add Executable Permissions | |
run: | | |
chmod +x *build/*.bin *build/*.exe *build/*.app/Contents/MacOS/* | |
- name: Zip Windows Executable | |
run: | | |
cd *windows-build | |
zip -9 ytm2spt-${{ github.ref_name }}-windows.zip *.exe | |
- name: Tar Linux Executable | |
run: | | |
cd *linux-build | |
tar -cavf ytm2spt-${{ github.ref_name }}-linux.tar.gz *.bin | |
- name: Zip MacOS Executable | |
run: | | |
cd *macos-build | |
zip -r -9 ytm2spt-${{ github.ref_name }}-macos.zip *.app | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: | | |
ytm2spt-${{ github.ref_name }}-windows.zip | |
ytm2spt-${{ github.ref_name }}-linux.tar.gz | |
ytm2spt-${{ github.ref_name }}-macos.zip |