Skip to content

Commit 9e6456a

Browse files
committed
workflows
1 parent a2a966b commit 9e6456a

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release-pypi.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update internal 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+
29+
- name: Checkout code
30+
uses: actions/checkout@v3
31+
32+
- name: Build and publish to Test PyPI
33+
if: ${{ (github.ref != 'refs/heads/main') && (github.event.label.name == 'release') }}
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
37+
run: |
38+
make dist
39+
ls dist/
40+
tar tvf dist/aros-node-*.tar.gz
41+
python3 -m twine upload --repository testpypi dist/*
42+
43+
- name: Build and publish to PyPI
44+
if: ${{ github.event_name == 'push' }}
45+
env:
46+
TWINE_USERNAME: __token__
47+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
48+
run: |
49+
make dist
50+
ls dist/
51+
tar tvf dist/aros-node-*.tar.gz
52+
python3 -m twine upload dist/*

0 commit comments

Comments
 (0)