-
Notifications
You must be signed in to change notification settings - Fork 105
58 lines (51 loc) · 1.51 KB
/
publish-python.yml
File metadata and controls
58 lines (51 loc) · 1.51 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
name: Upload Python Package
permissions:
contents: read
id-token: write
on:
workflow_call:
workflow_dispatch:
inputs:
tag:
description: "Tag to release (WARNING: Only use for emergency fixes, not for regular releases)"
required: false
type: string
defaults:
run:
shell: bash
working-directory: ./python
jobs:
# Note this code is currently duplicated in ci-post-release, due to PyPi
# limitations with reusable workflows, see comment there.
# If you make changes here please also update ci-post-release.yml accordingly.
deploy:
runs-on: ubuntu-latest-amd64
environment:
name: release
url: https://pypi.org/p/feldera
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.tag || github.ref }}
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: "0.4.15"
enable-cache: true
cache-dependency-glob: "python/uv.lock"
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "python/pyproject.toml"
- name: Install the project
run: uv sync --all-extras --dev
- name: Build package
run: |
uv build
- name: Publish package
if: ${{ vars.RELEASE_DRY_RUN == 'false' }}
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
with:
packages-dir: ./python/dist
- name: Minimize uv cache
run: uv cache prune --ci