Skip to content

publish-production

publish-production #1

name: publish-production
# publish to test.pypi.org on merge to default branch
on:
workflow_dispatch:
jobs:
publish-production-main:
environment: cucu-publish-production # match name in www.PyPI.org OIDC
runs-on: ubuntu-latest
permissions:
id-token: write # Required for connection to pypi OIDC
contents: read # For non-public repo
steps:
- name: checkout main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install depedencies
run: |
pip install poetry
poetry install --no-ansi
- name: build package
run: |
poetry build
- name: publish to test.pypi.org
uses: pypa/gh-action-pypi-publish@release/v1