Skip to content

Commit ae27a73

Browse files
committed
0.3.0 - add pypi workflow
Configure the python package uploading workflow.
1 parent 0d5e440 commit ae27a73

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Yarn run install
3939
uses: borales/actions-yarn@v4
4040
with:
41-
cmd: install # will run `yarn install` command
41+
cmd: install
4242
- name: Install dependencies
4343
run: |
4444
python -m pip install --upgrade pip
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.x'
29+
- name: Set up Node.js 22.x
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 22.x
33+
cache: 'npm'
34+
- name: Enable Corepack
35+
run: |
36+
npm install -g corepack
37+
corepack enable
38+
- name: Yarn run install
39+
uses: borales/actions-yarn@v4
40+
with:
41+
cmd: install
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install build wheel
46+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
47+
- name: Use Yarn to build component
48+
uses: borales/actions-yarn@v4
49+
with:
50+
cmd: build
51+
- name: Build package
52+
run: python -m build
53+
- name: Publish package
54+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
55+
with:
56+
user: __token__
57+
password: ${{ secrets.PYPI_API_TOKEN }}

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
6. Add the typehints `dash_json_grid.ThemeConfigs` for providing the `theme` property easily.
2020
7. Configure the python test workflow.
2121
8. Upload the .lock file because it is required by the workflow.
22+
9. Configure the python package uploading workflow.
2223

2324
#### :wrench: Fix
2425

0 commit comments

Comments
 (0)