forked from experimaestro/experimaestro-python
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.37 KB
/
Copy pathpython-publish.yml
File metadata and controls
50 lines (40 loc) · 1.37 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
# 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
- 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 python package
run: |
hatch build # uses the committed src/experimaestro/webui/data (no Node needed)
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1