-
Notifications
You must be signed in to change notification settings - Fork 1.7k
55 lines (46 loc) · 1.42 KB
/
publish.yml
File metadata and controls
55 lines (46 loc) · 1.42 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
name: Publish to PyPI
run-name: Publish ${{ github.event.release.tag_name || inputs.tag }}
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag (e.g. v1.2.3 or reflex-lucide-v0.1.0)"
required: true
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name || inputs.tag }}
fetch-tags: true
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Parse release tag
id: parse
env:
TAG: ${{ github.event.release.tag_name || inputs.tag }}
run: bash .github/scripts/publish/parse_tag.sh
- name: Pin reflex-base to exact version
if: steps.parse.outputs.package == 'reflex'
env:
VERSION: ${{ steps.parse.outputs.version }}
run: bash .github/scripts/publish/pin_reflex_base.sh
- name: Build
run: uv build --directory "${{ steps.parse.outputs.build_dir }}"
- name: Verify .pyi files in wheel
if: steps.parse.outputs.package == 'reflex'
env:
BUILD_DIR: ${{ steps.parse.outputs.build_dir }}
run: bash .github/scripts/publish/verify_pyi.sh
- name: Publish
run: uv publish dist/*