-
-
Notifications
You must be signed in to change notification settings - Fork 34
33 lines (29 loc) · 884 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Publish
on:
pull_request:
branches:
- main
types: [closed]
workflow_dispatch:
jobs:
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
outputs:
should-publish:
steps:
- name: Checkout code
uses: actions/checkout@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