Skip to content

Commit 1581685

Browse files
committed
modify CI actions to trigger PyPi upload
1 parent 30851bd commit 1581685

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/create_release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,15 @@ jobs:
9999
unprotect_reviews: true
100100

101101
- name: Create GitHub Release
102+
id: create_release
102103
uses: softprops/action-gh-release@v2
103104
with:
105+
token: ${{ secrets.YNPUT_BOT_TOKEN }}
104106
tag_name: ${{ steps.get_version.outputs.version }}
105107
generate_release_notes: true
108+
109+
publish:
110+
needs: release
111+
uses: ./.github/workflows/python-publish.yml
112+
secrets:
113+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/python-publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
# separate terms of service, privacy policy, and support
77
# documentation.
88

9-
name: ⬆️ Upload Python Package
9+
name: ⬆️ Upload PyPi Package
1010

1111
on:
1212
release:
1313
types: [published]
14+
workflow_call:
15+
secrets:
16+
PYPI_API_TOKEN:
17+
required: true
1418

1519
permissions:
1620
contents: read
@@ -23,9 +27,9 @@ jobs:
2327
url: https://pypi.org/p/ayon-python-api
2428

2529
steps:
26-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
2731
- name: Set up Python
28-
uses: actions/setup-python@v3
32+
uses: actions/setup-python@v5
2933
with:
3034
python-version: '3.10.x'
3135
- name: Install dependencies

0 commit comments

Comments
 (0)