Stage release files flat before artifact upload #8
Workflow file for this run
This file contains hidden or 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 Windows Binary | |
| on: | |
| push: | |
| branches: | |
| - feature/portable_build | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: pip install pyinstaller pillow | |
| - name: Generate icon | |
| run: python scripts/make_icon.py | |
| - name: Build binary | |
| run: pyinstaller app.spec | |
| - name: Run functional tests | |
| run: python -m unittest tests.test_binary -v | |
| - name: Read version | |
| id: version | |
| shell: bash | |
| run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
| - name: Stage release files | |
| shell: bash | |
| run: | | |
| mkdir -p release | |
| cp dist/dassiedrop.exe release/dassiedrop.exe | |
| cp dassiedrop.env.example release/dassiedrop.env.example | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dassiedrop-windows-${{ steps.version.outputs.version }} | |
| path: release/ | |
| if-no-files-found: error | |
| - name: Create release asset | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release/dassiedrop.exe | |
| release/dassiedrop.env.example | |
| name: DassieDrop ${{ steps.version.outputs.version }} | |
| generate_release_notes: true |