Skip to content

Merge $RELEASE_PR_BRANCH into main #8

Merge $RELEASE_PR_BRANCH into main

Merge $RELEASE_PR_BRANCH into main #8

Workflow file for this run

name: Publish
on:
pull_request:
branches:
- main
types: [closed]
workflow_dispatch:
jobs:
build:
name: Build source distribution and wheels
uses: ./.github/workflows/wheels.yml
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == ${{ vars.RELEASE_PR_BRANCH || 'create-pull-request/patch' }}
publish:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == ${{ vars.RELEASE_PR_BRANCH || 'create-pull-request/patch' }}
concurrency: publish
needs: [build]
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Publish to GitHub Releases
if: github.event_name == 'workflow_dispatch'
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: latest
- name: Publish to PyPI
if: github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
verbose: true