Skip to content

Test Upload Python Package #1

Test Upload Python Package

Test Upload Python Package #1

Workflow file for this run

name: Test Upload Python Package
on:
workflow_dispatch:
workflow: "*"
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: dist/*
name: artifacts
Publish:
needs: [Build]
name: Publish to TestPyPI
# Only run when dispatched manually
runs-on: Ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Download dist
uses: actions/[email protected]
with:
name: artifacts
path: dist
- name: Display downloaded files
run: |
ls -shR
working-directory: dist
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/