Skip to content

Commit 188b279

Browse files
authored
Create python-publish.yml
1 parent 109eb52 commit 188b279

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/python-publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
deploy:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: '3.x'
25+
26+
- name: Install build dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install setuptools wheel twine
30+
- name: Install pibooth
31+
run: |
32+
sudo apt-get install libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev libsdl1.2-dev
33+
pip install pibooth
34+
- name: Build and publish
35+
env:
36+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
37+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
38+
run: |
39+
python setup.py sdist bdist_wheel
40+
twine check dist/* && twine upload --skip-existing dist/*

0 commit comments

Comments
 (0)