Skip to content

Upload Python Package #8

Upload Python Package

Upload Python Package #8

Workflow file for this run

name: Upload Python Package
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Build
run: |
python -m pip install --upgrade pip build twine
python -m build
- name: Test wheels
run: |
python -m twine check dist/*
- name: Upload dist files for publication
uses: actions/upload-artifact@v2
with:
name: dist-files
path: dist
publish:
runs-on: ubuntu-latest
needs: build
# Run this job in an isolated GHA environment containing the OIDC credentials.
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v2
with:
name: dist-files
path: dist
- name: Publish
uses: pypa/[email protected]