Skip to content

Use PyPI trusted publishing #98

Use PyPI trusted publishing

Use PyPI trusted publishing #98

Workflow file for this run

name: Build package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip wheel build
- name: Building packages
run: python -m build
- uses: actions/upload-artifact@v4
with:
name: package
path: dist/*
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@v1.8.14