Skip to content

Skip existing wheels when publishing to PyPi #11

Skip existing wheels when publishing to PyPi

Skip existing wheels when publishing to PyPi #11

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
uses: ./.github/workflows/build.yml
create_release:
needs: [build]
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download wheels
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Extract Changelog
run: |
VERSION=${GITHUB_REF#refs/*/}
sed -n "/^## \\[${VERSION:1}\\]/,/^## \\[/p" CHANGELOG.md | sed '1,1d; $d' > RELEASE.md
- name: Publish release to GitHub
uses: softprops/action-gh-release@v2
with:
draft: true
body_path: RELEASE.md
files: dist/*.whl
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true