forked from wezterm/wezterm
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (107 loc) · 3.79 KB
/
Copy pathturtle-term-release.yml
File metadata and controls
121 lines (107 loc) · 3.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: TurtleTerm Release Artifacts
on:
push:
tags:
- 'turtle-term-v*'
workflow_dispatch:
inputs:
version:
description: 'TurtleTerm version label, e.g. turtle-term-v0.2.0-dev'
required: false
default: 'turtle-term-dev'
permissions:
actions: read
contents: write
id-token: write
attestations: write
artifact-metadata: write
jobs:
build:
name: Build TurtleTerm ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
target: macos-arm64
- os: ubuntu-24.04
target: linux-x86_64
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --default-toolchain stable --profile minimal
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
CI=yes ./get-deps
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install cmake pkg-config python@3.12 || true
- name: Build TurtleTerm binaries
run: |
cargo build --release --locked -p wezterm
cargo build --release --locked -p wezterm-gui
cargo build --release --locked -p wezterm-mux-server
- name: Run TurtleTerm smoke test
run: python3 assets/sourceos/tests/test_sourceos_term_smoke.py
- name: Package TurtleTerm
shell: bash
env:
INPUT_VERSION: ${{ github.event.inputs.version }}
run: |
chmod +x packaging/scripts/package-turtle-term.sh
if [[ "${GITHUB_REF:-}" == refs/tags/turtle-term-v* ]]; then
version="${GITHUB_REF_NAME}"
else
version="${INPUT_VERSION:-turtle-term-dev}"
fi
packaging/scripts/package-turtle-term.sh "$version" "${{ matrix.target }}"
- name: Verify packaged artifacts
shell: bash
run: |
ls -lah dist/
archive="$(find dist -name 'turtle-term-*.tar.gz' -print -quit)"
test -n "$archive"
test -f "$archive.sha256"
test -f "$archive.manifest.json"
python3 packaging/scripts/verify-turtle-term-artifact.py "$archive"
# Verify shell inits and mcp-server are included
tarlist="$(tar -tzf "$archive")"
echo "$tarlist" | grep -q 'shell/turtle-shell-init.zsh' && echo "shell init: OK"
echo "$tarlist" | grep -q 'turtle-mcp-server' && echo "mcp-server: OK"
- name: Attest TurtleTerm release artifacts
uses: actions/attest@v4
with:
subject-path: |
dist/turtle-term-*.tar.gz
dist/turtle-term-*.tar.gz.sha256
dist/turtle-term-*.tar.gz.manifest.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: turtle-term-${{ matrix.target }}
path: |
dist/turtle-term-*.tar.gz
dist/turtle-term-*.tar.gz.sha256
dist/turtle-term-*.tar.gz.manifest.json
- name: Publish GitHub release assets
if: startsWith(github.ref, 'refs/tags/turtle-term-v')
env:
GH_TOKEN: ${{ github.token }}
run: |
tag="${GITHUB_REF_NAME}"
gh release create "$tag" \
--title "TurtleTerm ${tag}" \
--notes "TurtleTerm ${tag} — see CHANGELOG for details." \
2>/dev/null || true
gh release upload "$tag" \
dist/turtle-term-*.tar.gz \
dist/turtle-term-*.tar.gz.sha256 \
dist/turtle-term-*.tar.gz.manifest.json \
--clobber