Skip to content

package-publish

package-publish #6

name: package-publish
on:
workflow_dispatch:
jobs:
cd:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Check-out repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
- name: Build package
run: python3 -m build
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Test install from TestPyPI
run: |
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps quanda
python -c "import quanda; print(quanda.__version__)"