diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec8831b..db202a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,15 +4,32 @@ on: workflow_dispatch jobs: pypi-publish: - name: upload release to PyPI - runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged + timeout-minutes: 10 environment: release + name: build package and upload release to PyPI + runs-on: ubuntu-latest permissions: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - # retrieve your distributions here + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.11 + + - name: Setup venv + run: . ./setup_dev_env.sh + + - name: Install build + run: python -m pip install -U build + + - name: Bump version as release + run: ./bump_version.sh release + + - name: Build package + run: | + python -m build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1