Repository navigation
155 lines (146 loc) · 5.13 KB
/
Copy pathrelease.yml
File metadata and controls
155 lines (146 loc) · 5.13 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Release
on:
push:
tags: ['v*']
workflow_dispatch:
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
jobs:
build-macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install dependencies
run: pnpm install
- name: Build Tauri app
run: pnpm tauri build --target ${{ matrix.target }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.target }}
path: |
src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app.tar.gz
src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app.tar.gz.sig
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: pnpm install
- name: Build Tauri app
run: pnpm tauri build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-x86_64
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
src-tauri/target/release/bundle/nsis/*.exe.sig
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
pnpm install
- name: Build Tauri app
run: pnpm tauri build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-x86_64
path: |
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz
src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz.sig
src-tauri/target/release/bundle/deb/*.deb
create-release:
needs: [build-macos, build-windows, build-linux]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
run: find artifacts -type f | head -50
- name: Generate latest.json
run: |
VERSION="${GITHUB_REF_NAME#v}"
# Read signature files
MAC_X64_SIG=$(cat artifacts/macos-x86_64-apple-darwin/*.sig 2>/dev/null | head -1 || echo "")
MAC_ARM_SIG=$(cat artifacts/macos-aarch64-apple-darwin/*.sig 2>/dev/null | head -1 || echo "")
WIN_SIG=$(cat artifacts/windows-x86_64/*.sig 2>/dev/null | head -1 || echo "")
LINUX_SIG=$(cat artifacts/linux-x86_64/*.sig 2>/dev/null | head -1 || echo "")
cat > latest.json << EOF
{
"version": "${VERSION}",
"notes": "See release notes on GitHub",
"pub_date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"platforms": {
"darwin-x86_64": {
"url": "https://github.com/BumpyClock/agent-term/releases/download/${GITHUB_REF_NAME}/Agent-Term.app.tar.gz",
"signature": "${MAC_X64_SIG}"
},
"darwin-aarch64": {
"url": "https://github.com/BumpyClock/agent-term/releases/download/${GITHUB_REF_NAME}/Agent-Term_aarch64.app.tar.gz",
"signature": "${MAC_ARM_SIG}"
},
"windows-x86_64": {
"url": "https://github.com/BumpyClock/agent-term/releases/download/${GITHUB_REF_NAME}/Agent-Term_x64-setup.exe",
"signature": "${WIN_SIG}"
},
"linux-x86_64": {
"url": "https://github.com/BumpyClock/agent-term/releases/download/${GITHUB_REF_NAME}/Agent-Term.AppImage.tar.gz",
"signature": "${LINUX_SIG}"
}
}
}
EOF
echo "Generated latest.json:"
cat latest.json
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/**/*.dmg
artifacts/**/*.app.tar.gz
artifacts/**/*.msi
artifacts/**/*.exe
artifacts/**/*.AppImage
artifacts/**/*.deb
latest.json
generate_release_notes: true