forked from wezterm/wezterm
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (113 loc) · 3.88 KB
/
Copy pathturtle-term-release.yml
File metadata and controls
129 lines (113 loc) · 3.88 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
122
123
124
125
126
127
128
129
name: TurtleTerm Release Artifacts
on:
push:
tags:
- 'turtle-term-v*'
workflow_dispatch:
inputs:
version:
description: 'TurtleTerm version label, for example turtle-term-v0.1.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: macos-15-intel
target: macos-x86_64
- os: ubuntu-24.04
target: linux-x86_64
- os: ubuntu-24.04-arm
target: linux-arm64
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- 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: Generate TurtleTerm SBOM
uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
output-file: dist/turtle-term-${{ matrix.target }}.spdx.json
upload-artifact: false
upload-release-assets: false
- 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"
test -f "dist/turtle-term-${{ matrix.target }}.spdx.json"
python3 packaging/scripts/verify-turtle-term-artifact.py "$archive"
- 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: Attest TurtleTerm SBOM
uses: actions/attest@v4
with:
subject-path: dist/turtle-term-*.tar.gz
sbom-path: dist/turtle-term-${{ matrix.target }}.spdx.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
dist/turtle-term-${{ matrix.target }}.spdx.json
- name: Publish GitHub release assets
if: startsWith(github.ref, 'refs/tags/turtle-term-v')
uses: softprops/action-gh-release@v2
with:
files: |
dist/turtle-term-*.tar.gz
dist/turtle-term-*.tar.gz.sha256
dist/turtle-term-*.tar.gz.manifest.json
dist/turtle-term-${{ matrix.target }}.spdx.json