Skip to content

0.1.4

0.1.4 #7

Workflow file for this run

# This workflow will upload the Toto Python Package to PyPI when a release is created
name: Upload Toto Package to PyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
release-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.10"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build wheel setuptools
- name: Install package dependencies
run: |
pip install -r requirements.txt
- name: Build release distributions
run: |
python -m build
- name: Upload distributions
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
environment:
name: pypi
# PyPI project URL for toto package
url: https://pypi.org/project/toto-ts/${{ github.event.release.name }}
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
packages-dir: dist/