Skip to content

Commit 0e7be17

Browse files
committed
try something else
1 parent 908ba17 commit 0e7be17

File tree

1 file changed

+48
-11
lines changed

1 file changed

+48
-11
lines changed

.github/workflows/publish.yml

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,54 @@ on: [push, workflow_dispatch]
44

55
jobs:
66
# Auto-publish when version is increased
7-
publish-job:
8-
# Only publish on `main` branch
9-
if: github.ref == 'refs/heads/pypi'
7+
deploy:
108
runs-on: ubuntu-latest
11-
permissions: # Don't forget permissions
12-
contents: write
13-
9+
environment:
10+
name: pypi
11+
url: https://pypi.org/project/ssak/
12+
permissions:
13+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
14+
defaults:
15+
run:
16+
working-directory: ./src
1417
steps:
15-
- uses: etils-actions/pypi-auto-publish@v1
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.x"
25+
26+
- name: Install dependencies
27+
run: |
28+
python3 -m pip install --upgrade pip
29+
pip install build
30+
31+
- name: Build package
32+
run: |
33+
python3 -m pip install --upgrade build
34+
python3 -m build
35+
36+
- name: Publish package to PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
1638
with:
17-
pkg-name: ssak
18-
# pypi-token: ${{ secrets.PYPI_API_TOKEN }}
19-
# gh-token: ${{ secrets.GITHUB_TOKEN }}
20-
parse-changelog: false
39+
packages-dir: ./src/dist/
40+
41+
42+
43+
44+
# publish-job:
45+
# # Only publish on `main` branch
46+
# if: github.ref == 'refs/heads/pypi'
47+
# runs-on: ubuntu-latest
48+
# permissions: # Don't forget permissions
49+
# contents: write
50+
51+
# steps:
52+
# - uses: etils-actions/pypi-auto-publish@v1
53+
# with:
54+
# pkg-name: ssak
55+
# # pypi-token: ${{ secrets.PYPI_API_TOKEN }}
56+
# # gh-token: ${{ secrets.GITHUB_TOKEN }}
57+
# parse-changelog: false

0 commit comments

Comments
 (0)