Skip to content

Update

Update #2

Workflow file for this run

name: Release Package
on: [push, pull_request]
jobs:
release-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.8.5
- name: Install Poetry plugins
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Build package
run: |
poetry build
ls -la dist/
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
retention-days: 1
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write
environment:
name: pypi
url: https://test.pypi.org/p/ipybox
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true