Skip to content

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 #712

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.10.3 #712

name: Build and upload to PyPI
on:
pull_request:
push:
branches:
- "main"
tags:
- "v*"
release:
types:
- published
jobs:
build_artifacts:
name: Build artifacts
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v4
- name: Set up pixi
uses: prefix-dev/[email protected]
- name: Build
# It seems as though flit publish expects a .pypirc file as compared to
# only a token passed as an argument.
# See https://flit.pypa.io/en/latest/cmdline.html#flit-publish
run: |
pixi run flit build
- uses: actions/upload-artifact@v4
with:
path: dist/*
upload_pypi:
name: Upload to PyPI
needs: [build_artifacts]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}