Skip to content

Commit 59d3770

Browse files
committed
Create release-pypi.yml
1 parent e656133 commit 59d3770

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 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@v3
25+
with:
26+
path: ~/.cache/pip
27+
key: ${{ runner.os }}-pip
28+
restore-keys: |
29+
${{ runner.os }}-pip
30+
31+
- name: Install dependencies
32+
run: |
33+
pip install --upgrade pip
34+
pip install wheel
35+
# see https://github.com/pypa/twine/issues/1216#issuecomment-2629069669
36+
pip install "packaging>=24.2"
37+
38+
- name: Checkout code
39+
uses: actions/checkout@v3
40+
41+
42+
- name: Build and publish to PyPI
43+
if: ${{ github.event_name == 'push' }}
44+
env:
45+
TWINE_USERNAME: __token__
46+
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
47+
run: |
48+
make dist
49+
ls dist/
50+
tar tvf dist/aros_node-*.tar.gz
51+
python3 -m twine upload dist/*

0 commit comments

Comments
 (0)