Skip to content

Commit 5ca48fa

Browse files
committed
Update release workflows
1 parent 87f2873 commit 5ca48fa

File tree

2 files changed

+25
-32
lines changed

2 files changed

+25
-32
lines changed
Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
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 to pypi
1+
name: Upload Python Package to PyPI
52

63
on: workflow_dispatch
74

85
jobs:
96
deploy:
10-
117
runs-on: ubuntu-latest
128

139
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: '3.8'
19-
- name: Install dependencies
20-
run: |
21-
pip install setuptools wheel twine
22-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23-
- name: Build and publish
24-
env:
25-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
26-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27-
run: |
28-
python setup.py sdist bdist_wheel
29-
twine upload dist/*
10+
- uses: actions/checkout@v3
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: 3.10
15+
- name: Install dependencies
16+
run: |
17+
pip install setuptools wheel twine
18+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
19+
- name: Build and publish to PyPI
20+
env:
21+
TWINE_USERNAME: "__token__"
22+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
23+
run: |
24+
python setup.py sdist bdist_wheel
25+
twine upload dist/*
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
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 to testpypi
1+
name: Upload Python Package to Test PyPI
52

63
on:
74
workflow_dispatch:
@@ -13,19 +10,19 @@ jobs:
1310
runs-on: ubuntu-latest
1411

1512
steps:
16-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1714
- name: Set up Python
18-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1916
with:
20-
python-version: 3.8
17+
python-version: 3.10
2118
- name: Install dependencies
2219
run: |
2320
pip install setuptools wheel twine
2421
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
- name: Build and publish
22+
- name: Build and publish to Test PyPI
2623
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
TWINE_USERNAME: "__token__"
25+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
2926
run: |
3027
python setup.py sdist bdist_wheel
31-
twine upload -r testpypi dist/*
28+
twine upload -r testpypi dist/*

0 commit comments

Comments
 (0)