-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 2.41 KB
/
Copy pathrelease.yaml
File metadata and controls
56 lines (54 loc) · 2.41 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
name: "Publish release to PyPI"
on:
push:
tags:
# Publish on any tag starting with a `v`, e.g., v0.0.1a2
- v*
jobs:
run:
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install Python 3.13
run: uv python install 3.13
- name: Build tangle-cli
run: uv build
- name: Build tangle-api
run: uv build --package tangle-api
# Check that basic features work and we didn't miss to include crucial files.
# Use package-specific globs so adding tangle-api artifacts does not change
# which distribution is installed for tangle-cli smoke tests.
- name: Smoke test tangle-cli wheel
run: |
uv run --isolated --no-project --find-links dist --with dist/tangle_cli-*.whl tangle version
uv run --isolated --no-project --find-links dist --with dist/tangle_cli-*.whl tangle-cli version
- name: Smoke test tangle-cli source distribution
run: |
uv run --isolated --no-project --find-links dist --with dist/tangle_cli-*.tar.gz tangle version
uv run --isolated --no-project --find-links dist --with dist/tangle_cli-*.tar.gz tangle-cli version
- name: Smoke test tangle-api wheel
run: |
uv run --isolated --no-project \
--with dist/tangle_cli-*.whl \
--with dist/tangle_api-*.whl \
python -c "import importlib.metadata as m; import tangle_api.generated.models; import tangle_api.schema; assert m.version('tangle-api') == m.version('tangle-cli')"
- name: Smoke test tangle-api source distribution
run: |
uv run --isolated --no-project \
--with dist/tangle_cli-*.tar.gz \
--with dist/tangle_api-*.tar.gz \
python -c "import importlib.metadata as m; import tangle_api.generated.models; import tangle_api.schema; assert m.version('tangle-api') == m.version('tangle-cli')"
- name: Smoke test native extra compatibility alias from local dist
run: |
cli_wheel="$(echo dist/tangle_cli-*.whl)"
uv run --isolated --no-project --find-links dist --with "${cli_wheel}[native]" tangle-cli version
- name: Publish
run: uv publish