-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (52 loc) · 1.48 KB
/
release.yml
File metadata and controls
60 lines (52 loc) · 1.48 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
name: Integration (pre-release / release)
on:
release:
types: [published] # Run after a Github publish
permissions:
contents: read
id-token: write # REQUIRED for PyPI Trusted Publishing (OIDC)
jobs:
integration:
uses: ./.github/workflows/run_tests.yml
with:
marker: 'integration'
secrets: inherit
build:
name: Build & Publish SDK
runs-on: ubuntu-latest
environment: pypi
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: ./.github/actions/python-uv-setup
- name: Clean dist directory
run: |
rm -rf dist
- name: Build distributions
run: |
uv build
- name: Extract package version
id: get_version
run: |
FILE=$(ls dist/getstream-*.tar.gz | head -1)
VERSION=$(basename "$FILE" .tar.gz | sed 's/^getstream-//')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Publish to PyPI (Trusted Publishing)
run: uv publish
test-index:
name: Verify PIP install works
needs: build
runs-on: ubuntu-latest
env:
UV_NO_SOURCES: "1"
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: ./.github/actions/python-uv-setup
with:
sync-flags: "--all-extras --dev"
- name: Install from PyPI using uv
run: |
uv pip install getstream==${{ needs.build.outputs.version }}