Repository navigation
45 lines (42 loc) · 1.54 KB
/
Copy pathdocs.yml
File metadata and controls
45 lines (42 loc) · 1.54 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
name: Docs
on:
push:
tags:
# Must match the tags release-plz actually creates, which is also what
# pypi.yml and npm.yml trigger on. A bare "v*" matches none of them.
- "cql2-v*"
workflow_dispatch:
permissions:
contents: write
pages: write
jobs:
docs:
runs-on: ubuntu-latest
env:
GIT_COMMITTER_NAME: ci-bot
GIT_COMMITTER_EMAIL: ci-bot@example.com
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
with:
fetch-depth: 0 # for git describe
- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@eedcf2fb1c22f010a0eb66b92f378c110977f266 # v2
- name: Install wasm-pack
run: cargo install wasm-pack
- name: build wasm
run: scripts/buildwasm
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: true
- name: Install Python
run: uv python install # we use uv instead of setup-python so we get python-version resolution between our two packages
- name: Sync
run: uv sync && uv sync --no-dev --inexact --directory python
- name: Deploy
run: |
# release-plz tags the library as `cql2-vX.Y.Z`; strip the crate
# prefix so the published docs version stays `vX.Y.Z`.
TAG=$(git describe --tags --match="cql2-v*" --abbrev=0)
VERSION=${TAG#cql2-}
uv run mike deploy $VERSION latest --update-aliases --push