Skip to content

Commit 7ad6086

Browse files
committed
Update publish.yml workflow: refine steps, use updated actions, and improve dependency management
1 parent f2b11ac commit 7ad6086

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,30 @@ name: Publish WorkFlow
22

33
on:
44
release:
5-
types: [created]
5+
types: [published]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python-version: [3.8]
1310
steps:
1411
- name: 🛎️ Checkout
15-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
13+
- name: 🐍 Set up Python
14+
uses: actions/setup-python@v5
1615
with:
17-
ref: ${{ github.head_ref }}
18-
- name: 🐍 Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: 🦾 Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install ".[dev]"
26-
- name: 🚀 Publish to PyPi
27-
env:
28-
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
29-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
30-
PYPI_TEST_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }}
16+
python-version: "3.10"
17+
cache: "pip"
18+
- name: 🦾 Install build dependencies
3119
run: |
32-
make publish -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -e PYPI_TEST_PASSWORD=$PYPI_TEST_PASSWORD
20+
python -m pip install --upgrade pip build
21+
- name: 📦 Build package
22+
run: python -m build
23+
- name: Upload to release
24+
uses: AButler/[email protected]
25+
with:
26+
files: "dist/*"
27+
repo-token: ${{ secrets.GITHUB_TOKEN }}
28+
- name: 🚀 Publish to PyPI
29+
uses: pypa/[email protected]
30+
with:
31+
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)