Skip to content

Merge pull request #21 from k8thekat/developer #19

Merge pull request #21 from k8thekat/developer

Merge pull request #21 from k8thekat/developer #19

Workflow file for this run

name: build
on:
push:
branches: [ main ]
release:
types: [ published ]
jobs:
# If we push to main we will make our sdist.
make-sdist:
name: Make source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: artifact-source-dist
path: "./**/dist/*.tar.gz"
upload_pypi:
# This only fires when we generate a release.
if: ${{github.event.release}}
runs-on: ubuntu-latest
needs: [make-sdist]
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: Copy artifacts to .dist/ folder
run: |
find . -name 'artifact-*' -exec unzip '{}' \;
mkdir -p dist/
find . -name '*.tar.gz' -exec mv '{}' dist/ \;
find . -name '*.whl' -exec mv '{}' dist/ \;
- uses: pypa/gh-action-pypi-publish@release/v1
name: Publish to PyPI