-
Notifications
You must be signed in to change notification settings - Fork 0
187 lines (156 loc) · 5.29 KB
/
release.yml
File metadata and controls
187 lines (156 loc) · 5.29 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
checks: read
jobs:
wait-for-ci:
name: Wait for CI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Wait for CI checks
uses: actions/github-script@v7
with:
script: |
const script = require('./.github/wait-for-checks.cjs');
await script({ github, context, core });
create-release:
name: Create Release
needs: wait-for-ci
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: "ChatToMap v${{ steps.version.outputs.version }}"
body: |
## ChatToMap Desktop v${{ steps.version.outputs.version }}
Export your iMessage history and discover all the places you've talked about!
### Download & Run (No installation needed)
**macOS:**
1. Download `ChatToMap_universal.dmg`
2. Open the DMG
3. Double-click ChatToMap to run it
**Windows:**
1. Download `ChatToMap_x64.exe`
2. Double-click to run it
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
build-macos:
name: Build macOS
needs: create-release
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: macos-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: macos-cargo-release-
- name: Cache Bun
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: macos-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: macos-bun-
- name: Install dependencies
run: bun install
- name: Build Tauri app (universal binary, DMG only)
run: bun run tauri build --target universal-apple-darwin --bundles dmg
- name: Rename and checksum DMG
run: |
cd src-tauri/target/universal-apple-darwin/release/bundle/dmg
# Rename to simpler name
for file in *.dmg; do
mv "$file" "ChatToMap_universal.dmg"
break
done
shasum -a 256 ChatToMap_universal.dmg > ChatToMap_universal.dmg.sha256
- name: Upload macOS artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: |
src-tauri/target/universal-apple-darwin/release/bundle/dmg/ChatToMap_universal.dmg
src-tauri/target/universal-apple-darwin/release/bundle/dmg/ChatToMap_universal.dmg.sha256
build-windows:
name: Build Windows
needs: create-release
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: windows-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: windows-cargo-release-
- name: Cache Bun
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: windows-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: windows-bun-
- name: Install dependencies
run: bun install
- name: Build Tauri app (portable exe only, no installer)
run: bun run tauri build --no-bundle
- name: Rename and checksum exe
shell: pwsh
run: |
$exePath = "src-tauri/target/release/chat-to-map-desktop.exe"
$newPath = "src-tauri/target/release/ChatToMap_x64.exe"
Copy-Item -Path $exePath -Destination $newPath
$hash = Get-FileHash -Path $newPath -Algorithm SHA256
"$($hash.Hash.ToLower()) ChatToMap_x64.exe" | Out-File -FilePath "$newPath.sha256" -Encoding ASCII
- name: Upload Windows artifacts
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: |
src-tauri/target/release/ChatToMap_x64.exe
src-tauri/target/release/ChatToMap_x64.exe.sha256