Skip to content

Merge pull request #1 from DVDAGames/feature/publishing #1

Merge pull request #1 from DVDAGames/feature/publishing

Merge pull request #1 from DVDAGames/feature/publishing #1

Workflow file for this run

# adapted from:
# https://til.simonwillison.net/pypi/pypi-releases-from-github
# https://github.com/snok/install-poetry
# https://jacobian.org/til/github-actions-poetry/
# https://github.com/orgs/community/discussions/25305#discussioncomment-8256560
name: Publish to PyPI
on:
push:
branches:
- main
tags-ignore:
- "**"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: build release distributions
run: |
uv build
- name: upload windows dists
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- build
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f