v0.2.0 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Publish Python Package | |
on: | |
release: | |
types: [created] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/gocam | |
permissions: | |
# this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
pipx inject poetry "poetry-dynamic-versioning[plugin]" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install | |
- name: Generate project files | |
run: make clean all | |
- name: Test project | |
run: make test | |
- name: Build source and wheel archives | |
run: poetry build | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |