Skip to content

Commit 570ee20

Browse files
authored
Merge pull request #35 from DeepLabCut/MMathisLab-pypi
Create release-pypi.yml
2 parents 2172c18 + 2688fed commit 570ee20

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
pull_request:
8+
branches:
9+
- main
10+
types:
11+
- labeled
12+
- opened
13+
- edited
14+
- synchronize
15+
- reopened
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Cache dependencies
23+
id: pip-cache
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip
28+
29+
- name: Install dependencies
30+
run: |
31+
pip install --upgrade pip
32+
pip install wheel
33+
pip install "packaging>=24.2"
34+
35+
- name: Checkout code
36+
uses: actions/checkout@v3
37+
38+
- name: Build and publish to PyPI
39+
if: ${{ github.event_name == 'push' }}
40+
env:
41+
TWINE_USERNAME: __token__
42+
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
43+
run: |
44+
make dist
45+
ls dist/
46+
tar tvf dist/dlclibrary-*.tar.gz
47+
python3 -m twine upload dist/*

0 commit comments

Comments
 (0)