Skip to content

Commit d80f8da

Browse files
committed
update publish request to not require release artifacts
1 parent 658c56e commit d80f8da

File tree

9 files changed

+440
-836
lines changed

9 files changed

+440
-836
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ jobs:
2020
with:
2121
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2222
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
23+
environment: production
2324
wranglerVersion: "4.14.1"

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ All artifacts are signed with [minisign](https://jedisct1.github.io/minisign/) u
1717
RWR+9B91GBZ0zOjh6Lr17+zKf5BoSuFvrx2xSeDE57uIYvnKBGmMjOex
1818
```
1919

20+
The signature file can be found by appending `.minisig` to the artifact file URI.
21+
2022
## /v1/zls/select-version
2123

22-
Will respond with metadata about a ZLS build that is useable with the given Zig version.
24+
Will respond with metadata about a ZLS build that is usable with the given Zig version.
2325
The response body is similar to Zig's [index.json](https://ziglang.org/download/index.json).
2426

2527
### Query Parameters
@@ -458,22 +460,21 @@ The [index.json](https://builds.zigtools.org/index.json) imitates Zig's [index.j
458460
> [!IMPORTANT]
459461
> This request is only intended to be used by ZLS's GitHub CI.
460462
461-
The body is a `multipart/form-data` with the following key value pairs:
463+
The body is a JSON object with the following fields:
462464

463-
- `zls-version`: The ZLS version which must be a semantic version
464-
- `zig-version`: The Zig version which must be a semantic version
465-
- `minimum-build-zig-version`: The minimum Zig version that is required to compile and test ZLS
466-
- `minimum-runtime-zig-version`: The minimum Zig version that is required to run ZLS
465+
- `zlsVersion`: The ZLS version which must be a semantic version
466+
- `zigVersion`: The Zig version which must be a semantic version
467+
- `minimumBuildZigVersion`: The minimum Zig version that is required to compile and test ZLS
468+
- `minimumRuntimeZigVersion`: The minimum Zig version that is required to run ZLS
467469
- `compatibility`: Describes how compatible the Zig and ZLS version are (valid values: `"none"`, `"only-runtime"`, `"full"`)
470+
- `artifacts`: A `Map<string, { shasum: string; size: number }>`. `shasum` is the sha256 has of the file and `size` is the size of the file in bytes.
468471

469-
All other fields are interpreted as release artifacts. The key must have the following format:
472+
The key of `artifacts` is the file name of a release artifact with the following format:
470473

471474
`zls-${OS}-${ARCH}-${ZLS_VERSION}.(tar.xz|tar.gz|zip)` (Example: `zls-linux-x86_64-0.1.0.tar.xz`)
472475

473476
Artifacts that target windows must be `.zip` files. All other non windows targets must include `.tar.xz` **and** `.tar.gz`.
474477

475-
Release artifacts can also be signed with [minisign](https://jedisct1.github.io/minisign/) by publishing an additional `.minisig` file for every artifact. (Example: `zls-linux-x86_64-0.1.0.tar.xz.minisig`)
476-
477478
## Development
478479

479480
```bash
@@ -489,5 +490,6 @@ npm run dev
489490
# Publish a ZLS release (Requires `tar` and `7z`)
490491
git clone https://github.com/zigtools/zls
491492
cd zls
492-
ZLS_WORKER_ENDPOINT=http://localhost:8787 zig build publish --summary all
493+
zig build release
494+
ZLS_WORKER_ENDPOINT=http://localhost:8787 zig run .github/workflows/publish_release.zig
493495
```

0 commit comments

Comments
 (0)