-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (49 loc) · 1.57 KB
/
python-publish.yml
File metadata and controls
61 lines (49 loc) · 1.57 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow will upload a Python Package
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
permissions:
contents: write # Required to update release notes
id-token: write # Required for PyPI trusted publishing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for hatch-vcs to determine version
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install hatch
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Generate changelog for this release
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --latest --strip header
env:
OUTPUT: release-notes.md
- name: Update release notes
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
- name: Build web app
working-directory: ./app
run: |
npm --version
npm install --no-save
NODE_OPTIONS="--loader ts-node/esm" npm run build
- name: Build python package
run: |
hatch build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1