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 Python App | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.13.2"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| sudo apt install python3-pyaudio | |
| pip install -r requirements.txt | |
| - name: Run tests | |
| run: | | |
| pytest | |
| - name: Build application | |
| # python setup.py sdist bdist_wheel | |
| run: | | |
| python UBUNTUsetup.py | |
| - name: create release | |
| id: create_release | |
| #uses: actions/create-release@v1.1.4 | |
| uses: ncipollo/release-action@v1.14.0 | |
| #env: | |
| #GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag: ${{ github.ref_name }} | |
| #release_name: ${{ github.event.head_commit.message }} | |
| name: Prerelease ${{ github.ref_name }} | |
| #overwrite: true | |
| body: | | |
| Prerelease ${{ github.ref_name }} | |
| draft: true | |
| prerelease: true | |
| generateReleaseNotes: true | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-package-${{ matrix.os }}-py${{ matrix.python-version }} | |
| path: dist/ |