add use_non_matching_label (#199) #1156
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 and upload to PyPI | |
| # Build on every branch push, tag push, and pull request change: | |
| on: [push, pull_request] | |
| jobs: | |
| build_wheel: | |
| name: Build wheel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@main | |
| - name: Setup venv | |
| run: | | |
| python3 -m venv .venv | |
| - name: Install build module | |
| run: | | |
| . .venv/bin/activate | |
| python3 -m pip install -U build | |
| - name: Build wheel and source | |
| run: | | |
| . .venv/bin/activate | |
| python3 -m build --sdist --wheel --outdir dist/ . | |
| - uses: actions/upload-artifact@main | |
| with: | |
| path: dist/* | |
| upload_pypi: | |
| name: Upload release to PyPI | |
| needs: [build_wheel] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/spimdisasm | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/download-artifact@main | |
| with: | |
| name: artifact | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.13.0 |