Skip to content

Merge pull request #34 from ouspg/dev #8

Merge pull request #34 from ouspg/dev

Merge pull request #34 from ouspg/dev #8

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
tags: ['**']
jobs:
pypi-build:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Build package distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build distributions
run: |
python -m pip install build
python -m build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist-build
path: dist/
retention-days: 3
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Publish to PyPI
runs-on: ubuntu-latest
needs: pypi-build
environment:
name: pypi
url: https://pypi.org/p/avise
permissions:
id-token: write
contents: read
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist-build
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.14.0
with:
verbose: true