Skip to content

CD Pipeline

CD Pipeline #4

Workflow file for this run

name: CD Pipeline
on:
workflow_dispatch:
jobs:
test_publish_package:
name: publish package to test pypi
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: build package
run: uv build
- name: publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
publish:
name: publish package to pypi
runs-on: ubuntu-latest
needs: test_publish_package
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
# - name: Add uv to PATH
# run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: build
run: uv build
- name: publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}