-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.05 KB
/
Copy pathrelease-python.yml
File metadata and controls
44 lines (35 loc) · 1.05 KB
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
34
35
36
37
38
39
40
41
42
43
44
name: "Release: Python (PyPI)"
on:
push:
tags: ["v*"]
# Manual re-trigger to republish after a workflow fix, without re-tagging
# (same rationale as release-core.yml's workflow_dispatch).
workflow_dispatch:
jobs:
publish:
name: Build & publish Python package
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # trusted publisher (OIDC)
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- run: npm install
- name: Sync generated presets → python/src/molplot/presets/
run: npm run build:presets
- name: Presets in sync
run: npm run check:presets
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build wheel + sdist
run: pip install build && python -m build
working-directory: python
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist/