Skip to content

Commit e1f4864

Browse files
authored
Setup our deployment pipeline (#6)
2 parents 09b264b + 7f42d4d commit e1f4864

11 files changed

Lines changed: 1200 additions & 66 deletions

File tree

.github/workflows/publish-vscode.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-standalone:
10+
name: Build Standalone (${{ matrix.target }})
11+
strategy:
12+
matrix:
13+
include:
14+
- platform: ubuntu-22.04
15+
target: x86_64-unknown-linux-gnu
16+
artifact-name: standalone-linux-x64
17+
- platform: macos-latest
18+
target: aarch64-apple-darwin
19+
artifact-name: standalone-mac-aarch64
20+
- platform: macos-latest
21+
target: x86_64-apple-darwin
22+
artifact-name: standalone-mac-x86_64
23+
- platform: windows-latest
24+
target: x86_64-pc-windows-msvc
25+
artifact-name: standalone-win-x64
26+
runs-on: ${{ matrix.platform }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
34+
- uses: pnpm/action-setup@v4
35+
with:
36+
version: 10
37+
38+
- name: Install workspace dependencies
39+
run: pnpm install --frozen-lockfile
40+
41+
- uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.target }}
44+
45+
- name: Rust cache
46+
uses: swatinem/rust-cache@v2
47+
with:
48+
workspaces: standalone/src-tauri
49+
50+
- name: Install system dependencies (Linux)
51+
if: matrix.platform == 'ubuntu-22.04'
52+
run: |
53+
sudo apt-get update -qq
54+
sudo apt-get install -y -qq libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
55+
56+
- name: Build Tauri app
57+
uses: tauri-apps/tauri-action@v0
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
projectPath: standalone
62+
tauriScript: pnpm tauri
63+
args: --target ${{ matrix.target }}
64+
65+
- name: Upload artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: ${{ matrix.artifact-name }}
69+
path: |
70+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.exe
71+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.msi
72+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.dmg
73+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.app
74+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.app.tar.gz
75+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.app.tar.gz.sig
76+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage
77+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage.tar.gz
78+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.AppImage.tar.gz.sig
79+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.deb
80+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.nsis.zip
81+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/**/*.nsis.zip.sig
82+
standalone/src-tauri/target/${{ matrix.target }}/release/bundle/nsis/**
83+
84+
build-vscode:
85+
name: Build VSCode Extension
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
90+
- uses: actions/setup-node@v4
91+
with:
92+
node-version: 22
93+
94+
- uses: pnpm/action-setup@v4
95+
with:
96+
version: 10
97+
98+
- name: Install workspace dependencies
99+
run: pnpm install --frozen-lockfile
100+
101+
- name: Test lib
102+
run: pnpm --filter mouseterm-lib test
103+
104+
- name: Build frontend for VSCode
105+
run: pnpm --filter mouseterm build:frontend
106+
107+
- name: Build extension
108+
run: pnpm --filter mouseterm build
109+
110+
- name: Package extension
111+
run: cd vscode-ext && npx vsce package --no-dependencies
112+
113+
- name: Upload .vsix
114+
uses: actions/upload-artifact@v4
115+
with:
116+
name: vscode-extension
117+
path: vscode-ext/*.vsix
118+
119+
publish-vscode:
120+
name: Publish VSCode Extension
121+
needs:
122+
- build-standalone
123+
- build-vscode
124+
runs-on: ubuntu-latest
125+
steps:
126+
- uses: actions/checkout@v4
127+
128+
- uses: actions/setup-node@v4
129+
with:
130+
node-version: 22
131+
132+
- uses: pnpm/action-setup@v4
133+
with:
134+
version: 10
135+
136+
- name: Install workspace dependencies
137+
run: pnpm install --frozen-lockfile
138+
139+
- name: Download .vsix
140+
uses: actions/download-artifact@v4
141+
with:
142+
name: vscode-extension
143+
path: vscode-ext
144+
145+
- name: Publish to VS Code Marketplace
146+
run: cd vscode-ext && npx vsce publish --packagePath *.vsix --no-dependencies
147+
env:
148+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
149+
150+
- name: Publish to OpenVSX
151+
run: cd vscode-ext && npx ovsx publish --packagePath *.vsix --no-dependencies
152+
env:
153+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ vscode-ext/media/
1515
vscode-ext/node_modules/
1616
vscode-ext/*.vsix
1717

18+
# Release signing work directory (created by scripts/sign-and-deploy.sh)
19+
release-signed/
20+
1821
# Tauri / Standalone
1922
standalone/src-tauri/target/
2023
standalone/src-tauri/binaries/

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/).
6+
7+
## [0.1.0] - 2026-04-09
8+
9+
- Initial release to test publishing.

0 commit comments

Comments
 (0)