Set the hv4gha 0.3.0 release version #7
Workflow file for this run
This file contains 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: | |
tags: | |
- v* | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
pypi: | |
name: PyPi Publish | |
runs-on: ubuntu-24.04 | |
environment: | |
name: release | |
url: https://pypi.org/project/hv4gha/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Output expected packge version refs/tags/ | |
id: expected | |
run: echo "tagref=refs/tags/v$(poetry version --short)" >> "$GITHUB_OUTPUT" | |
- name: Fail on mismatch between tag and package version | |
if: github.ref != steps.expected.outputs.tagref | |
run: echo "Mismatch between pushed tag and package version"; exit 1 | |
- name: Build package | |
run: poetry build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 |