BUG: Build wheel in addition to sdist (wheel has version baked into m… #19
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: Publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Installing Python | |
| run: | | |
| sudo apt-get update -qy | |
| sudo apt-get install -y \ | |
| python3-dev \ | |
| python3-pip \ | |
| python3-venv | |
| python3 -m venv ../venv | |
| source ../venv/bin/activate | |
| pip install build | |
| - name: Get version from git tag | |
| id: get_version | |
| run: | | |
| VERSION=$(git describe --tags --always) | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "Building version: ${VERSION}" | |
| - name: Build package | |
| env: | |
| DISCOVER_VERSION: ${{ steps.get_version.outputs.version }} | |
| run: | | |
| source ../venv/bin/activate | |
| python3 -m build . | |
| - name: Publish package | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| uses: pypa/gh-action-pypi-publish@master | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_PASSWORD }} |