v1.5.9 - Fix uploading output file #96
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 | |
on: | |
release: | |
types: [created] | |
jobs: | |
build_windows_exe: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.12" | |
- name: Install | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install . pyinstaller | |
Remove-Item -Recurse -Force build | |
- name: Build exe | |
run: | | |
nicegui-pack --name=smh-gui_${{ github.ref_name }} --onefile src/synth_mapping_helper/gui.py | |
- name: Upload windows_exe | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_exe | |
path: dist | |
deploy: | |
needs: build_windows_exe | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install setuptools build wheel twine | |
- name: Package Windows helpers | |
run: | | |
zip -r windows_helpers.zip windows_helpers | |
- name: Download windows_exe | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows_exe | |
- name: Upload Artifacts | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "smh-gui_${{ github.ref_name }}.exe,windows_helpers.zip,windows_helpers/install.bat,windows_helpers/smh_gui.bat" | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
omitDraftDuringUpdate: true | |
omitNameDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: | | |
python3 -m build | |
python3 -m twine upload --repository pypi dist/* |