-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
deb80f4
commit d365cfa
Showing
3 changed files
with
78 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: > | ||
build ${{ matrix.python-version }} on ${{ matrix.platform || matrix.os }} | ||
${{ (matrix.arch) || '' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu, windows, macos] | ||
python-version: ['cp312', 'cp311'] | ||
|
||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- uses: pypa/cibuildwheel@v2.17.0 | ||
env: | ||
CIBW_BUILD: '${{ matrix.python-version }}-*' | ||
CIBW_ARCHS: ${{ matrix.arch || 'auto' }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.os }}-${{ matrix.python-version }} | ||
path: ./wheelhouse/*.whl | ||
|
||
upload: | ||
name: Upload wheels to PYPI | ||
runs-on: ubuntu-latest | ||
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch') | ||
needs: [build_wheels, build_sdist] | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/pyforc | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Retrieve wheels and sdist | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: wheels-* | ||
merge-multiple: true | ||
path: wheels/ | ||
|
||
- name: List all built wheels | ||
run: | | ||
ls -lAs wheels/ | ||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1.8 | ||
with: | ||
packages_dir: wheels/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters