Skip to content

Commit 1559cd5

Browse files
authored
Merge pull request #79 from Learnosity/LRN-43927/feature/add-workflow-to-release-to-pypi
[BUILD] Add workflow to release to PyPi - LRN-43927
2 parents ff6ab0d + 1bf441e commit 1559cd5

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/pypi-release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will release to PyPi
2+
3+
name: Release to PyPi
4+
5+
on:
6+
release:
7+
types: [published]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
pypi-publish:
15+
name: upload release to PyPI
16+
runs-on: ubuntu-latest
17+
permissions:
18+
id-token: write
19+
steps:
20+
- name: Check out code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: '3.x'
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install setuptools wheel twine
32+
33+
- name: Build and check Python distributions
34+
run: |
35+
python setup.py sdist bdist_wheel
36+
twine check dist/*
37+
38+
- name: Publish package distributions to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)