Skip to content

Commit 63179f4

Browse files
committed
add publish action
1 parent 73c5f96 commit 63179f4

1 file changed

Lines changed: 13 additions & 19 deletions

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,30 @@
1-
name: Publish Package
1+
name: Publish to PyPI
22

33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- "v*.*.*"
77

88
jobs:
99
build-and-publish:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v3
13+
- name: Check out repository
14+
uses: actions/checkout@v4
1515

1616
- name: Set up Python
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.12.11'
19+
python-version: "3.12.11"
2020

21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
21+
- name: Install build tool
22+
run: pip install build
2523

2624
- name: Build package
27-
run: |
28-
python setup.py sdist bdist_wheel
25+
run: python -m build
2926

30-
- name: Publish package to PyPI
31-
env:
32-
TWINE_PASSWORD: ${{ secrets.PIP_TOKEN_XTRACER }}
33-
TWINE_NO_KEYRING: true
34-
run: |
35-
pip install twine
36-
twine upload dist/*
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@v1
29+
with:
30+
password: ${{ secrets.PIP_TOKEN_XTRACER }}

0 commit comments

Comments
 (0)