Skip to content

Update astral-sh/setup-uv action to v7.1.4 (#109) #361

Update astral-sh/setup-uv action to v7.1.4 (#109)

Update astral-sh/setup-uv action to v7.1.4 (#109) #361

name: Build and Publish
on:
push:
tags:
- "v*"
branches:
- "main"
- "breaking"
pull_request:
jobs:
build:
name: Build Distribution
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
with:
version: "0.9.11"
- name: uv build
run: uv build --verbose -o dist
- name: Store the distribution packages
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish to TestPyPI
needs: [build]
runs-on: ubuntu-24.04
environment:
name: testpypi
url: https://test.pypi.org/p/parsnip-cif
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: python-package-distributions
path: dist/
- name: Publish to TestPyPI
# TODO: https://github.com/pypa/gh-action-pypi-publish/pull/378
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
skip-existing: true
verify-metadata: true
publish-to-pypi:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/parsnip-cif
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
# TODO: https://github.com/pypa/gh-action-pypi-publish/pull/378
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0