8000 publish · woocommerce/wc-api-python@dc77ff9 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc77ff9

Browse files
committed
publish
1 parent fb5aa27 commit dc77ff9

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

.github/workflows/publish.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
# This workflow 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-
name: Publish package to PyPI
1+
name: Upload Python Package
2+
43
on:
54
release:
6-
types: [created]
5+
types: [published]
6+
77
jobs:
88
deploy:
9-
name: Deploy
10-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1110
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v2
14-
- name: Set up Python
15-
uses: actions/setup-python@v2
16-
with:
17-
python-version: '3.9'
18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install setuptools wheel twine
22-
- name: Build and publish
23-
env:
24-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26-
run: |
27-
python setup.py sdist bdist_wheel
28-
twine upload dist/*
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install build
20+
- name: Build package
21+
run: python -m build
22+
- name: Publish package
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)
0