Release v1.0.0 #7
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: Release Python app | |
run-name: Release ${{ github.ref_name }} | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build app for ${{ matrix.os }} | |
runs-on: ${{ matrix.runner_os }} | |
strategy: | |
matrix: | |
runner_os: ["windows-latest", "macos-latest", "ubuntu-latest"] | |
include: | |
- runner_os: "windows-latest" | |
os: "Windows" | |
- runner_os: "macos-latest" | |
os: "Mac" | |
- runner_os: "ubuntu-latest" | |
os: "Linux" | |
steps: | |
- name: Checkout ref | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
pip install https://github.com/pyinstaller/pyinstaller/archive/7ebb7014a47f635a2475e4047714f45578f03dec.zip | |
- name: PyInstaller | |
run: pyinstaller --onefile --windowed script.py --name CatPack_Crafter_${{ github.ref_name }}_${{ matrix.os }} | |
- name: List dist directory | |
run: ls -R dist | |
- name: Tar files on Linux | |
if: ${{ matrix.runner_os == 'ubuntu-latest' }} | |
run: | | |
chmod +x dist/CatPack_Crafter_${{ github.ref_name }}_${{ matrix.os }} | |
tar -czvf dist/CatPack_Crafter_${{ github.ref_name }}_${{ matrix.os }}.tar.gz dist/CatPack_Crafter_${{ github.ref_name }}_${{ matrix.os }} | |
rm -rf dist/CatPack_Crafter_${{ github.ref_name }}_${{ matrix.os }} | |
- name: Upload debug builds | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}_builds | |
path: build/* | |
- name: Upload distributable builds | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}_dists | |
path: dist/* | |
normal_release: | |
name: Draft normal release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: release-artifacts | |
pattern: "*_dists" | |
- name: List release-artifacts directory # debug | |
run: ls -R release-artifacts | |
- name: Draft normal release | |
uses: ncipollo/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: true | |
tag: ${{ github.ref_name }} | |
artifacts: CatPack_Crafter_${{ github.ref_name }}_* | |
draft: true | |
name: "CatPack_Crafter_${{ github.ref_name }}" | |
body: "Need help? Refer to the documentation site." |