Release v1.0.0-test #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: Release Python app | |
run-name: Release ${{ github.ref_name }} | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Build app on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["windows-latest", "macos-latest", "ubuntu-latest"] | |
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 pyinstaller | |
- name: PyInstaller | |
run: pyinstaller main.py | |
- name: List dist directory | |
run: ls -R dist | |
- name: Upload debug build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}_build | |
path: build/ | |
- name: Upload distributable build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}_dist | |
path: dist/ | |
release: | |
name: Draft a release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Install zipping utility | |
run: sudo apt install zip | |
- name: Download Windows artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-latest_dist | |
path: release-artifacts | |
- name: Rename Windows artifacts | |
run: | | |
cd release-artifacts | |
mv main/ windows-latest_dist/ | |
zip -r ${{ github.ref_name }}-windows-release.zip windows-latest_dist | |
cd translator | |
- name: Download MacOS artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: macos-latest_dist | |
path: release-artifacts | |
- name: Rename Mac artifacts | |
run: | | |
cd release-artifacts | |
mv main/ macos-latest_dist/ | |
zip -r ${{ github.ref_name }}-mac-release.zip macos-latest_dist | |
cd translator | |
- name: Download Linux artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu-latest_dist | |
path: release-artifacts | |
- name: Rename Linux artifacts | |
run: | | |
cd release-artifacts | |
mv main/ linux-latest_dist/ | |
zip -r ${{ github.ref_name }}-linux-release.zip linux-latest_dist | |
cd translator | |
- name: List release-artifacts directory # debug | |
run: ls -R release-artifacts | |
- name: Draft release | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: true | |
tag: ${{ github.ref_name }} | |
artifacts: release-artifacts/*-release.zip | |
draft: true |