WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7657535

Browse files
authored
Merge pull request #1363 from swap357/gha/add_pypi_main_upload
add publish to PyPI step on upload packages workflow
2 parents 010e6fd + 90daaaa commit 7657535

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/upload_packages.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
required: false
1818
type: boolean
1919
default: false
20+
publish_to_pypi:
21+
description: 'Publish to PyPI (main)'
22+
required: false
23+
type: boolean
24+
default: false
2025

2126
concurrency:
2227
group: ${{ github.workflow }}-${{ inputs.tag || github.sha }}
@@ -162,6 +167,36 @@ jobs:
162167
repository-url: https://test.pypi.org/legacy/
163168
verbose: true
164169

170+
publish-pypi:
171+
name: Publish to PyPI
172+
needs: publish-testpypi
173+
if: inputs.publish_to_pypi
174+
runs-on: ubuntu-latest
175+
environment:
176+
name: pypi
177+
url: https://pypi.org/p/llvmlite
178+
permissions:
179+
id-token: write
180+
181+
steps:
182+
- name: Download wheels artifact
183+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
184+
with:
185+
name: wheels
186+
path: dist
187+
188+
- name: List artifacts to publish
189+
run: |
190+
echo "=== To publish ==="
191+
ls -lh dist/
192+
echo ""
193+
find dist -type f -name "*.whl" | wc -l
194+
195+
- name: Publish wheels to PyPI
196+
uses: pypa/gh-action-pypi-publish@release/v1
197+
with:
198+
verbose: true
199+
165200
publish-anaconda-org:
166201
name: Publish to Anaconda.org
167202
needs: download-artifacts

0 commit comments

Comments
 (0)