Skip to content

Commit 49c19c8

Browse files
authored
Fix release workflow (#83)
1 parent c0766f1 commit 49c19c8

File tree

1 file changed

+18
-25
lines changed

1 file changed

+18
-25
lines changed

.github/workflows/release-deploy.yml

+18-25
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,43 @@ name: release-deploy
33
on:
44
release:
55
types: [ published ]
6+
# push:
7+
# branches: [ main ]
8+
# pull_request:
69

710
jobs:
8-
build_deploy:
9-
name: Build and deploy
11+
build-deploy:
1012
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/project/pylibjpeg/
16+
permissions:
17+
id-token: write
1118

1219
steps:
1320
- uses: actions/checkout@v4
1421
with:
1522
submodules: true
1623

17-
- uses: actions/setup-python@v5
18-
name: Install Python
24+
- name: Install Python
25+
uses: actions/setup-python@v5
1926
with:
20-
python-version: 3.9
21-
22-
- name: Install requirements
27+
python-version: 3.8
2328

29+
- name: Install required packages
2430
run: |
2531
python -m pip install -U pip
26-
python -m pip install twine wheel
32+
python -m pip install build
2733
2834
- name: Build wheels and sdist
2935
run: |
30-
python setup.py sdist bdist_wheel
36+
python -m build
3137
32-
- uses: actions/upload-artifact@v4
38+
- name: Upload artifacts
39+
uses: actions/upload-artifact@v4
3340
with:
3441
name: wheels
3542
path: ./dist
3643

3744
- name: Publish package to PyPi
38-
environment:
39-
name: pypi
40-
url: https://pypi.org/project/pylibjpeg/
41-
permissions:
42-
id-token: write
43-
44-
steps:
45-
- name: Download the wheels
46-
uses: actions/download-artifact@v4
47-
with:
48-
path: dist/
49-
merge-multiple: true
50-
51-
- name: Publish package to PyPi
52-
uses: pypa/gh-action-pypi-publish@release/v1
45+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)