Skip to content

chore(main): release 0.2.3 #16

chore(main): release 0.2.3

chore(main): release 0.2.3 #16

Workflow file for this run

name: Publish To PyPI
on:
pull_request_target:
branches:
- main
types:
- closed
workflow_dispatch:
jobs:
check-pr-title:
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.merged == true }}
runs-on: ubuntu-latest
outputs:
is_chore_main_release: ${{ steps.check_title.outputs.is_chore_main_release }}
steps:
- name: Check PR title
id: check_title
run: |
if [[ "${{ github.event.pull_request.title }}" == "chore(main): release"* ]]; then
echo "::set-output name=is_chore_main_release::true"
else
echo "::set-output name=is_chore_main_release::false"
fi
pypi-publish:
needs: check-pr-title
if: ${{ needs.check-pr-title.outputs.is_chore_main_release == 'true' }}
name: Upload release to PyPI
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: pdm-project/setup-pdm@v3
with:
version: "head"
- name: Publish package distributions to PyPI
run: pdm publish