Skip to content

0.4.0

0.4.0 #5

Workflow file for this run

name: Publish Package
on:
# Only run when release is created in the master branch
release:
types: [created]
branches:
- 'master'
jobs:
build:
name: Build distributable files
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout source repository'
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
- name: Install build dependencies
run: pip install build twine
- name: 'Build package'
run: scripts/build.sh
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
path: 'dist/*'
upload_pypi:
name: Upload packages
needs: ['build']
runs-on: 'ubuntu-latest'
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: '__token__'
password: '${{ secrets.PYPI_API_TOKEN }}'