Skip to content

Commit e8d1a58

Browse files
committed
Add Windows build workflow and release automation
- Add Windows build workflow for MSI and NSIS installers - Add comprehensive release workflow for automated releases - Update Linux build to generate checksums - Configure Tauri for Windows builds (MSI, NSIS targets) - Add version bump script for release management - Add RELEASE.md documentation
1 parent ec05df4 commit e8d1a58

File tree

6 files changed

+261
-2
lines changed

6 files changed

+261
-2
lines changed

.github/workflows/build-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
mkdir -p dist/linux-x86_64
4949
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb dist/linux-x86_64/ || true
5050
cp src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage dist/linux-x86_64/ || true
51+
52+
# Generate checksums
53+
cd dist/linux-x86_64
54+
sha256sum * > checksums.txt
5155
5256
- name: Upload artifacts
5357
uses: actions/upload-artifact@v4
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Windows
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main, test-linux-workflow]
7+
8+
jobs:
9+
build:
10+
name: Build Windows x86_64
11+
runs-on: windows-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Rust
17+
uses: dtolnay/rust-toolchain@stable
18+
with:
19+
targets: x86_64-pc-windows-msvc
20+
21+
- name: Setup Rust cache
22+
uses: Swatinem/rust-cache@v2
23+
with:
24+
workspaces: src-tauri
25+
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v2
28+
29+
- name: Install dependencies
30+
run: bun install
31+
32+
- name: Build Tauri app
33+
run: bun run tauri build --target x86_64-pc-windows-msvc
34+
35+
- name: Create artifacts directory
36+
shell: bash
37+
run: |
38+
mkdir -p dist/windows-x86_64
39+
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/msi/*.msi dist/windows-x86_64/ || true
40+
cp src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe dist/windows-x86_64/ || true
41+
42+
# Create a zip of the executable
43+
cd src-tauri/target/x86_64-pc-windows-msvc/release/
44+
7z a -tzip ../../../../dist/windows-x86_64/Claudia-windows-x86_64.zip claudia.exe
45+
cd ../../../../
46+
47+
- name: Generate checksums
48+
shell: bash
49+
run: |
50+
cd dist/windows-x86_64
51+
sha256sum * > checksums.txt
52+
53+
- name: Upload artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: windows-x86_64
57+
path: dist/windows-x86_64/*

.github/workflows/release.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to release (e.g., v1.0.0)'
11+
required: true
12+
type: string
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
# Build jobs for each platform
19+
build-linux:
20+
uses: ./.github/workflows/build-linux.yml
21+
secrets: inherit
22+
23+
build-macos:
24+
uses: ./.github/workflows/build-macos.yml
25+
secrets: inherit
26+
27+
build-windows:
28+
uses: ./.github/workflows/build-windows.yml
29+
secrets: inherit
30+
31+
# Create release after all builds complete
32+
create-release:
33+
name: Create Release
34+
needs: [build-linux, build-macos, build-windows]
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Determine version
41+
id: version
42+
run: |
43+
if [ "${{ github.event_name }}" = "push" ]; then
44+
VERSION="${GITHUB_REF#refs/tags/}"
45+
else
46+
VERSION="${{ inputs.version }}"
47+
fi
48+
echo "version=$VERSION" >> $GITHUB_OUTPUT
49+
echo "Version: $VERSION"
50+
51+
- name: Download all artifacts
52+
uses: actions/download-artifact@v4
53+
with:
54+
path: artifacts
55+
56+
- name: Prepare release assets
57+
run: |
58+
mkdir -p release-assets
59+
60+
# Linux artifacts
61+
if [ -d "artifacts/linux-x86_64" ]; then
62+
cp artifacts/linux-x86_64/*.deb release-assets/Claudia_${{ steps.version.outputs.version }}_linux_x86_64.deb || true
63+
cp artifacts/linux-x86_64/*.AppImage release-assets/Claudia_${{ steps.version.outputs.version }}_linux_x86_64.AppImage || true
64+
fi
65+
66+
# macOS artifacts
67+
if [ -d "artifacts/macos-universal" ]; then
68+
cp artifacts/macos-universal/Claudia.dmg release-assets/Claudia_${{ steps.version.outputs.version }}_macos_universal.dmg || true
69+
cp artifacts/macos-universal/Claudia.app.zip release-assets/Claudia_${{ steps.version.outputs.version }}_macos_universal.app.tar.gz || true
70+
fi
71+
72+
# Windows artifacts
73+
if [ -d "artifacts/windows-x86_64" ]; then
74+
cp artifacts/windows-x86_64/*.msi release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64.msi || true
75+
cp artifacts/windows-x86_64/*.exe release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64_setup.exe || true
76+
cp artifacts/windows-x86_64/Claudia-windows-x86_64.zip release-assets/Claudia_${{ steps.version.outputs.version }}_windows_x86_64.zip || true
77+
fi
78+
79+
# Generate signatures for all files
80+
cd release-assets
81+
for file in *; do
82+
if [ -f "$file" ]; then
83+
sha256sum "$file" > "$file.sha256"
84+
fi
85+
done
86+
cd ..
87+
88+
- name: Create Release
89+
uses: softprops/action-gh-release@v1
90+
with:
91+
tag_name: ${{ steps.version.outputs.version }}
92+
name: Claudia ${{ steps.version.outputs.version }}
93+
draft: true
94+
prerelease: false
95+
generate_release_notes: true
96+
files: release-assets/*
97+
body: |
98+
## Claudia ${{ steps.version.outputs.version }}
99+
100+
### Downloads
101+
102+
#### macOS
103+
- Universal binary (Intel + Apple Silicon)
104+
- `.dmg` - Disk image installer (recommended)
105+
- `.app.tar.gz` - Application bundle
106+
107+
#### Windows
108+
- `.msi` - Windows Installer (recommended)
109+
- `.exe` - NSIS installer (alternative)
110+
- `.zip` - Portable executable
111+
112+
#### Linux
113+
- `.AppImage` - Universal Linux package (recommended)
114+
- `.deb` - Debian/Ubuntu package
115+
116+
### Installation
117+
118+
**macOS**: Download the `.dmg` file, open it, and drag Claudia to your Applications folder.
119+
120+
**Windows**: Download the `.msi` file and run it. For portable use, download the `.zip` file.
121+
122+
**Linux**: Download the `.AppImage` file, make it executable (`chmod +x`), and run it. For Debian/Ubuntu, use the `.deb` file.
123+
124+
### Verification
125+
126+
All files include `.sha256` signature files for verification.
127+
128+
### What's Changed
129+
130+
See below for a full list of changes in this release.

RELEASE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Release Checklist
2+
3+
## Pre-release
4+
- [ ] All tests passing
5+
- [ ] Update CHANGELOG.md
6+
- [ ] Bump version using `./scripts/bump-version.sh X.Y.Z`
7+
- [ ] Create PR for version bump
8+
- [ ] Merge PR
9+
10+
## Release
11+
- [ ] Create and push tag: `git tag -a vX.Y.Z -m "Release vX.Y.Z" && git push --tags`
12+
- [ ] Wait for GitHub Actions to complete
13+
- [ ] Review draft release on GitHub
14+
- [ ] Update release notes with highlights
15+
- [ ] Publish release
16+
17+
## Post-release
18+
- [ ] Verify all download links work
19+
- [ ] Test installation on each platform
20+
- [ ] Update Homebrew formula (if applicable)
21+
- [ ] Announce release

scripts/bump-version.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# Script to bump version across all files
4+
# Usage: ./scripts/bump-version.sh 1.0.0
5+
6+
set -e
7+
8+
if [ -z "$1" ]; then
9+
echo "Usage: $0 <version>"
10+
echo "Example: $0 1.0.0"
11+
exit 1
12+
fi
13+
14+
VERSION=$1
15+
16+
echo "Bumping version to $VERSION..."
17+
18+
# Update package.json
19+
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json && rm package.json.bak
20+
21+
# Update Cargo.toml
22+
sed -i.bak "s/^version = \".*\"/version = \"$VERSION\"/" src-tauri/Cargo.toml && rm src-tauri/Cargo.toml.bak
23+
24+
# Update tauri.conf.json
25+
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json && rm src-tauri/tauri.conf.json.bak
26+
27+
# Update Info.plist
28+
sed -i.bak "s/<string>.*<\/string><!-- VERSION -->/<string>$VERSION<\/string><!-- VERSION -->/" src-tauri/Info.plist && rm src-tauri/Info.plist.bak
29+
30+
echo "✅ Version bumped to $VERSION in all files"
31+
echo ""
32+
echo "Next steps:"
33+
echo "1. Review the changes: git diff"
34+
echo "2. Commit: git commit -am \"chore: bump version to v$VERSION\""
35+
echo "3. Tag: git tag -a v$VERSION -m \"Release v$VERSION\""
36+
echo "4. Push: git push && git push --tags"

src-tauri/tauri.conf.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@
5555
"rpm",
5656
"appimage",
5757
"app",
58-
"dmg"
58+
"dmg",
59+
"msi",
60+
"nsis"
5961
],
6062
"icon": [
6163
"icons/32x32.png",
6264
"icons/128x128.png",
6365
"icons/128x128@2x.png",
64-
"icons/icon.icns"
66+
"icons/icon.icns",
67+
"icons/icon.ico"
6568
],
6669
"resources": [],
6770
"externalBin": [],
@@ -84,6 +87,14 @@
8487
"signingIdentity": null,
8588
"providerShortName": null,
8689
"entitlements": "entitlements.plist"
90+
},
91+
"windows": {
92+
"certificateThumbprint": null,
93+
"digestAlgorithm": "sha256",
94+
"timestampUrl": "http://timestamp.digicert.com",
95+
"webviewInstallMode": {
96+
"type": "embedBootstrapper"
97+
}
8798
}
8899
}
89100
}

0 commit comments

Comments
 (0)