-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (60 loc) · 1.82 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (60 loc) · 1.82 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
62
63
64
65
name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # hatch-vcs derives the version from the tag
- uses: actions/setup-node@v4
with:
node-version: "22"
# Build the FleetSuite SPA first — the wheel ships it (hatch `artifacts`).
- run: npm ci && npm run build
working-directory: web-ui
- uses: astral-sh/setup-uv@v5
- run: uv build
# Smoke: the wheel must contain the built SPA and import cleanly with no extras.
- run: |
python -m zipfile -l dist/*.whl | grep -q "web/static/index.html"
python -m venv /tmp/smoke && /tmp/smoke/bin/pip install -q dist/*.whl
/tmp/smoke/bin/python -c "import meshtastic_mcp.server"
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish-pypi:
needs: build
# Only publish from a version tag — a manual workflow_dispatch run stops at
# the build artifact instead of pushing a dev version to PyPI.
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # PyPI Trusted Publishing (OIDC) — no API token needed
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
github-release:
needs: publish-pypi
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true