Skip to content

Commit 68f051c

Browse files
author
Devon Ryan
committed
Start adding github actions release activity
1 parent fa851c3 commit 68f051c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: pypi
2+
on: [push]
3+
jobs:
4+
pypi:
5+
name: upload to pypi
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
with:
10+
fetch-depth: 0
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.9'
15+
- name: Install build prerequisites
16+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
17+
run: |
18+
python -m pip install --upgrade twine build cibuildwheel
19+
- name: sdist
20+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
21+
run: |
22+
python -m build --sdist
23+
- name: wheel
24+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
25+
run: |
26+
python -m cibuildwheel --output-dir wheelhouse
27+
- name: upload
28+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
29+
env:
30+
TWINE_USERNAME: "__token__"
31+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
32+
run: |
33+
twine upload dist/*
34+
twine upload wheelhouse/*

0 commit comments

Comments
 (0)