Skip to content

Commit 5cc3ea5

Browse files
committed
Update python-publish.yml
1 parent 4abc9f0 commit 5cc3ea5

File tree

1 file changed

+21
-41
lines changed

1 file changed

+21
-41
lines changed
Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,50 @@
1-
# This workflow will upload a Python Package to PyPI when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Upload Python Package
102

113
on:
124
release:
135
types: [published]
146

15-
permissions:
16-
contents: read
17-
187
jobs:
198
release-build:
209
runs-on: ubuntu-latest
21-
2210
steps:
2311
- uses: actions/checkout@v4
2412

2513
- uses: actions/setup-python@v5
2614
with:
27-
python-version: "3.x"
15+
python-version: "3.12"
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip build wheel kivy>=2.3
2820
29-
- name: Build release distributions
21+
- name: Build package
3022
run: |
31-
# NOTE: put your own distribution build steps here.
32-
python -m pip install build
33-
python -m build
23+
python -m build --wheel --sdist # Runs in root (where setup.py is)
24+
ls -la dist/ # Verify files
3425
35-
- name: Upload distributions
26+
- name: Verify distributions
27+
run: |
28+
pip install twine
29+
twine check dist/*
30+
31+
- name: Upload artifacts
3632
uses: actions/upload-artifact@v4
3733
with:
38-
name: release-dists
34+
name: pypi-release
3935
path: dist/
4036

4137
pypi-publish:
38+
needs: release-build
4239
runs-on: ubuntu-latest
43-
needs:
44-
- release-build
4540
permissions:
46-
# IMPORTANT: this permission is mandatory for trusted publishing
47-
id-token: write
48-
49-
# Dedicated environments with protections for publishing are strongly recommended.
50-
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
41+
id-token: write # Required for PyPI trusted publishing
5142
environment:
5243
name: pypi
53-
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
54-
# url: https://pypi.org/p/YOURPROJECT
55-
#
56-
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
57-
# ALTERNATIVE: exactly, uncomment the following line instead:
58-
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
59-
44+
url: https://pypi.org/project/ErgoCreate-SimpleKivy/
6045
steps:
61-
- name: Retrieve release distributions
62-
uses: actions/download-artifact@v4
46+
- uses: actions/download-artifact@v4
6347
with:
64-
name: release-dists
48+
name: pypi-release
6549
path: dist/
66-
67-
- name: Publish release distributions to PyPI
68-
uses: pypa/gh-action-pypi-publish@release/v1
69-
with:
70-
packages-dir: dist/
50+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)