-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (66 loc) · 2.18 KB
/
Copy pathrelease.yml
File metadata and controls
82 lines (66 loc) · 2.18 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
id-token: write # Required for PyPI Trusted Publishing
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout CLI
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Download Frontend Artifact
env:
GH_TOKEN: ${{ github.token }}
run: |
# Download latest public release asset from frontend repo
gh release download --repo embeddr-net/embeddr-frontend --pattern "frontend-dist.zip" --dir .
# Create target directory
mkdir -p src/embeddr/web
# Unzip into target
unzip frontend-dist.zip -d src/embeddr/web
# Cleanup
rm frontend-dist.zip
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build Python Package
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
name: dist
path: dist/
release:
name: Publish Release
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/embeddr-cli
steps:
- name: Download artifacts
uses: actions/download-artifact@v6
with:
name: dist
path: dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
make_latest: true
- name: Publish to PyPI via OIDC
uses: pypa/gh-action-pypi-publish@release/v1