Skip to content

Commit 9909df2

Browse files
committed
[WIP] Add workflow to release to PyPi - LRN-43927
1 parent 6f2d091 commit 9909df2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pypi-release.yml

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

0 commit comments

Comments
 (0)