Repository navigation
75 lines (73 loc) · 2.79 KB
/
Copy pathrelease-gpui.yml
File metadata and controls
75 lines (73 loc) · 2.79 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: "Release GPUI"
# Publish a fresh snapshot of Zed's gpui crates to crates.io as gpui-pre-*.
# See script/bump-gpui.ts for the publishing and validation pipeline.
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
inputs:
rev:
description: "Zed branch, tag or commit to publish"
required: false
default: "main"
version:
description: "Publish exactly this version instead of the next <VERSION>.<N>"
required: false
default: ""
force:
description: "Publish even when Zed did not change the published crates"
type: boolean
required: false
default: false
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
publish:
name: Publish gpui-pre
# macOS verifies the Metal shader build script of gpui_apple, the one
# part of the pipeline that only compiles on Apple platforms.
runs-on: macos-latest
# Package verification builds the staged GPUI crates. Brand-new crates
# may also wait on crates.io's rate limit between publish batches.
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: oven-sh/setup-bun@v2
# The staged GPUI crates need the platform build dependencies.
- name: Install system dependencies
run: script/bootstrap
- name: Cache the staged workspace and repository builds
uses: actions/cache@v6
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
target/
key: release-gpui-${{ runner.os }}-${{ github.run_id }}
restore-keys: release-gpui-${{ runner.os }}-
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
bun script/bump-gpui.ts ${{ inputs.version }} --skip-kit-check --rev "${{ inputs.rev || 'main' }}" ${{ inputs.force && '--force' || '' }}
- name: Summary
if: always()
run: |
if [ -f target/gpui-pre/gpui-pre.json ]; then
{
echo "## gpui-pre $(jq -r .version target/gpui-pre/gpui-pre.json)"
echo
echo "Zed revision: $(jq -r .zed.rev target/gpui-pre/gpui-pre.json)"
echo
if [ "$(jq -r '.kit_check.passed // empty' target/gpui-pre/gpui-pre.json)" = "false" ]; then
echo "> [!WARNING]"
echo "> gpui-kit needs adapting: $(jq -r .kit_check.error target/gpui-pre/gpui-pre.json)"
echo
fi
echo '| Zed crate | Published as |'
echo '| --- | --- |'
jq -r '.crates[] | "| \(.zed_name) | \(.name) |"' target/gpui-pre/gpui-pre.json
} >> "$GITHUB_STEP_SUMMARY"
fi