Move sample files #19
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 | |
on: [push] | |
permissions: | |
contents: write | |
jobs: | |
build_windows: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
if: startsWith(runner.os, 'Windows') | |
with: | |
path: | | |
~\AppData\Local\pip\Cache | |
${{ env.GITHUB_WORKSPACE }}\.hatch\Lib\site-packages | |
key: win-pip-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
win-pip- | |
- name: Install build dependencies | |
run: pip install hatch | |
- name: Setup build environment | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: | | |
hatch -v env create | |
hatch run pip install pyinstaller | |
hatch run wavebin -h | |
- name: Build wheel | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: hatch -v build | |
- name: Build exe | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: hatch run pyinstaller --clean wavebin/wavebin_win.spec | |
- name: Upload wheel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wavebin.whl | |
path: dist/wavebin-*-py3-none-any.whl | |
retention-days: 1 | |
- name: Upload exe | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wavebin.exe | |
path: dist/wavebin.exe | |
retention-days: 1 | |
build_macos_intel: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
if: startsWith(runner.os, 'macOS') | |
with: | |
path: | | |
~/Library/Caches/pip | |
${{ env.GITHUB_WORKSPACE }}\.hatch\Lib\site-packages | |
key: macos-pip-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
macos-pip- | |
- name: Install build dependencies | |
run: pip install hatch | |
- name: Setup build environment | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: | | |
hatch -v env create | |
hatch run pip install pyinstaller pillow | |
hatch run wavebin -h | |
- name: Build app | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: hatch run pyinstaller --clean wavebin/wavebin_macos.spec | |
- name: Upload app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wavebin.app | |
path: dist/wavebin.app | |
retention-days: 1 |