Skip to content

Commit b0e30e2

Browse files
committed
update publish yaml
1 parent b6f138d commit b0e30e2

File tree

1 file changed

+22
-29
lines changed

1 file changed

+22
-29
lines changed
Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,35 @@
11
# This workflow will upload a Python Package using Twine when a release is created
22
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
33

4-
name: Publish to PyPI
4+
name: Upload Python Package
55

66
on:
77
release:
8-
types: [published]
8+
types: [created]
99

1010
jobs:
1111
deploy:
12-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
13-
runs-on: ubuntu-latest
1412

15-
# https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
16-
permissions:
17-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
13+
runs-on: ubuntu-latest
1814

19-
environment:
20-
name: pypi
21-
url: https://pypi.org/p/empiarreader
15+
environment: deployment
2216

2317
steps:
24-
- uses: actions/checkout@v3
25-
- name: Set up Python
26-
uses: actions/setup-python@v4
27-
with:
28-
python-version: "3.x"
29-
30-
- name: Install dependencies
31-
run: |
32-
python -m pip install --upgrade pip
33-
pip install -U setuptools wheel twine
34-
35-
- name: Build and publish
36-
run: |
37-
python setup.py sdist bdist_wheel
38-
39-
- name: Publish distribution 📦 to PyPI
40-
uses: pypa/gh-action-pypi-publish@release/v1
41-
with:
42-
verbose: true
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: recursive
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: '3.x'
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install setuptools wheel twine
29+
- name: Build and publish
30+
env:
31+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
32+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
33+
run: |
34+
python setup.py sdist
35+
twine upload dist/*

0 commit comments

Comments
 (0)