Skip to content

Commit 908a4c2

Browse files
authored
Merge pull request #98 from boutproject/fix-publish-ci
Fix publish ci
2 parents 9582d09 + 33f37ee commit 908a4c2

File tree

2 files changed

+17
-24
lines changed

2 files changed

+17
-24
lines changed

.github/workflows/python_publish.yml

+17-18
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
name: Upload Python Package
22

33
on:
4-
# Only run when a release is created
54
release:
6-
types: [created]
5+
types: [published]
76

87
jobs:
98
deploy:
109
runs-on: ubuntu-latest
10+
permissions:
11+
# IMPORTANT: this permission is mandatory for trusted publishing
12+
id-token: write
1113
steps:
12-
- uses: actions/checkout@v1
13-
- name: Set up Python
14-
uses: actions/setup-python@v1
15-
with:
16-
python-version: '3.x'
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install setuptools wheel twine
21-
- name: Build and publish
22-
env:
23-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
24-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
25-
run: |
26-
python setup.py sdist bdist_wheel
27-
twine upload dist/*
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.x'
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build
23+
- name: Build package
24+
run: python -m build --sdist --wheel
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@release/v1

setup.py

-6
This file was deleted.

0 commit comments

Comments
 (0)