mirror of
https://github.com/Decompollaborate/rabbitizer.git
synced 2025-02-05 09:40:12 +00:00
Update pypi upload action based on cibuildwheel example
This commit is contained in:
parent
7e2765b31a
commit
95f82f3c2a
31
.github/workflows/pypi_upload.yml
vendored
31
.github/workflows/pypi_upload.yml
vendored
@ -1,12 +1,15 @@
|
||||
# Based on https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
|
||||
# Permalink: https://github.com/pypa/cibuildwheel/blob/9c75ea15c2f31a77e6043b80b1b7081372319d85/examples/github-deploy.yml
|
||||
|
||||
name: Build and upload to PyPI
|
||||
|
||||
# Only run on releases
|
||||
on:
|
||||
push:
|
||||
# Pattern matched against refs/tags
|
||||
tags:
|
||||
- '**' # Push events to every tag including hierarchical tags like v1.0/beta
|
||||
# on: [push, pull_request]
|
||||
# on:
|
||||
# push:
|
||||
# # Pattern matched against refs/tags
|
||||
# tags:
|
||||
# - '**' # Push events to every tag including hierarchical tags like v1.0/beta
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build_wheels:
|
||||
@ -14,7 +17,8 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, macos-latest, windows-latest]
|
||||
# macos-13 is an intel runner, macos-14 is apple silicon
|
||||
os: [ubuntu-20.04, macos-13, macos-14, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout reposistory
|
||||
@ -35,6 +39,7 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||
path: ./wheelhouse/*.whl
|
||||
|
||||
build_sdist:
|
||||
@ -50,21 +55,27 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cibw-sdist
|
||||
path: dist/*.tar.gz
|
||||
|
||||
upload_pypi:
|
||||
needs: [build_wheels, build_sdist]
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
environment: pypi
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: artifact
|
||||
# unpacks all CIBW artifacts into dist/
|
||||
pattern: cibw-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@v1.12.3
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
|
@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Try to fix Python releases again, again.
|
||||
- Why are we still here? Just to suffer?
|
||||
|
||||
## [1.12.3] - 2024-12-16
|
||||
|
||||
### Fixed
|
||||
|
Loading…
x
Reference in New Issue
Block a user