Skip to content

bump version for release 0.7.1 #37

bump version for release 0.7.1

bump version for release 0.7.1 #37

Workflow file for this run

name: Publish on PyPI
on:
push:
tags:
# After vMajor.Minor.Patch _anything_ is allowed (without "/") !
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'stfc/janus-core' && startsWith(github.ref, 'refs/tags/v')
environment:
name: release
permissions:
# For PyPI's trusted publishing.
id-token: write
# For release.
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.7"
python-version: "3.12"
- name: Install dependencies
run: uv sync
- name: Build
run: uv build
- name: Get version from pyproject.toml
run: echo "VERSION=$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)" >> $GITHUB_ENV
- name: Check version matches tag
if: ${{ ! contains(github.ref, env.VERSION) }}
run: |
echo "Git tag does not match version in pyproject.toml"
exit 1
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: steps.check-prerelease.outputs.prerelease == 'true'
skipIfReleaseExists: true
- name: Publish to PyPI
run: uv publish