Repository navigation
Bump setup-python #193
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: Check, build and release | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*.*.*" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Lint | |
| uses: psf/black@stable | |
| - name: Test with pytest | |
| run: docker compose -f test-compose.yml up --exit-code-from coder-core-test coder-core-test | |
| build_and_release: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 'pypy3.12' | |
| - name: Install build tools | |
| run: pip install build twine | |
| - name: Build wheel | |
| run: python -m build | |
| - name: Check build | |
| run: twine check dist/* | |
| - name: Publish build to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| - name: Create release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| generate_release_notes: true | |
| files: dist/* |