diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bc5f40..701af14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ jobs: test: uses: ./.github/workflows/ci.yml - # If tests are successful, we build the wheel and push it to the release build-wheel: needs: test runs-on: ubuntu-latest @@ -18,27 +17,27 @@ jobs: with: python-version: '3.13' + # Check package version matches release tag - name: Check package version matches tag run: | - pkgver=$(python -c "import autocorpus; print(autocorpus.__version__, end='')") - + pkgver=$(poetry run python -c "import autocorpus; print(autocorpus.__version__, end='')") # NB: tag name must be prefixed by "v" (the default for GitHub Releases) test v$pkgver = ${{ github.ref_name }} + # Build package with Poetry - name: Build package run: poetry build - # Upload files as test artifact (to be retrieved later) + # Upload files as test artifact - uses: actions/upload-artifact@v4 with: path: dist/* - # Publish files as release artifacts + # Publish files as release artifacts - uses: softprops/action-gh-release@v2 with: files: dist/* - # If all goes well, publish to PyPI publish-pypi: needs: build-wheel name: Publish to PyPI