Skip to content

Commit

Permalink
Merge pull request #79 from Learnosity/LRN-43927/feature/add-workflow…
Browse files Browse the repository at this point in the history
…-to-release-to-pypi

[BUILD] Add workflow to release to PyPi - LRN-43927
  • Loading branch information
walsh-conor authored Aug 14, 2024
2 parents ff6ab0d + 1bf441e commit 1559cd5
Showing 1 changed file with 39 additions and 0 deletions.
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

0 comments on commit 1559cd5

Please sign in to comment.