Skip to content

Commit f5f8e4b

Browse files
committed
feat: pubish with the pypa action
1 parent fc75202 commit f5f8e4b

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,41 @@ on:
88

99
jobs:
1010
build:
11+
name: Package wheel
1112
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
python-version: ["3.12"]
1513
steps:
1614
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
17-
- name: Set up Python ${{ matrix.python-version }}
15+
- name: Set up Python
1816
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
1917
with:
20-
python-version: ${{ matrix.python-version }}
18+
python-version: "3.13.0"
2119
- name: Install publish dependencies
2220
run: |
23-
python -m pip install --upgrade pip
24-
pip install '.[publish]'
21+
python -m pip install --upgrade pip build
2522
- name: Build and test wheel
2623
run: |
2724
rm -rf dist/
2825
python -m build --sdist --wheel .
29-
twine check dist/*
30-
- name: Publish
31-
run: |
32-
twine upload --non-interactive --verbose --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} dist/*
26+
- name: Store wheel
27+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
28+
with:
29+
name: beku-stackabletech-package
30+
path: dist/
31+
pypi-publish:
32+
name: Upload to PyPI
33+
needs:
34+
- build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: pypi
38+
url: https://pypi.org/p/beku-stackabletech
39+
permissions:
40+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
41+
steps:
42+
- name: Download wheel
43+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
44+
with:
45+
name: beku-stackabletech-package
46+
path: dist/
47+
- name: Publish distribution 📦 to PyPI
48+
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2

0 commit comments

Comments
 (0)