Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[BUILD] Add workflow to release to PyPi - LRN-43927
  • Loading branch information
walsh-conor committed Aug 14, 2024
commit 1bf441ecb0a3b062fcdd24598988cb4b29bd0a0b
39 changes: 39 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will release to PyPi

name: Release to PyPi

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build and check Python distributions
run: |
python setup.py sdist bdist_wheel
twine check dist/*

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1