Repository navigation
96 lines (81 loc) · 3.45 KB
/
Copy pathdev-build.yml
File metadata and controls
96 lines (81 loc) · 3.45 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
name: Dev build
# Builds "Diffity Dev" from the branch it is run on: an amber-icon copy of the app with its own bundle id,
# data, link scheme (diffity-dev://) and command (diffity-dev), so it installs next to the release.
# It replaces the rolling `dev` pre-release; the updater reads releases/latest, which skips pre-releases.
on:
workflow_dispatch:
concurrency:
group: dev-build
cancel-in-progress: true
jobs:
desktop:
name: macOS universal (dev)
permissions:
contents: write
runs-on: macos-latest
timeout-minutes: 90
env:
DIFFITY_CHANNEL: dev
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
key: universal-dev
- run: pnpm install --frozen-lockfile
- name: Build the diffity-mcp and diffity-cli sidecars for both architectures
run: node scripts/prepare-mcp.mjs --release
env:
TAURI_ENV_TARGET_TRIPLE: universal-apple-darwin
- name: Stamp a dev version from the last release
id: version
run: |
LAST=$(git describe --tags --abbrev=0 --match 'v*' 2>/dev/null || echo v0.0.0)
VER="${LAST#v}-dev.${{ github.run_number }}"
python3 -c "import json,sys; p='src-tauri/tauri.conf.json'; d=json.load(open(p)); d['version']=sys.argv[1]; json.dump(d,open(p,'w'),indent=2)" "$VER"
echo "version=$VER" >> "$GITHUB_OUTPUT"
echo "short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
echo "Building Diffity Dev $VER"
- name: Remove the previous dev release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release delete dev --cleanup-tag --yes || true
# See release.yml: the icon ships as a compiled Assets.car, so actool should not run.
- name: Point at the newest Xcode, and say which one
run: |
newest=$(printf '%s\n' /Applications/Xcode*.app | sort -V | tail -1)
if [ -d "$newest" ]; then
sudo xcode-select -s "$newest"
fi
xcode-select -p
xcodebuild -version
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
projectPath: .
tagName: dev
releaseCommitish: ${{ github.sha }}
releaseName: Diffity Dev ${{ steps.version.outputs.version }}
releaseBody: |
Test build of `${{ github.ref_name }}` at ${{ steps.version.outputs.short }}. Not a release.
Installs as **Diffity Dev** (amber icon) next to Diffity, with its own data. It does not update itself; run the Dev build workflow again for a newer one.
releaseDraft: false
prerelease: true
args: --target universal-apple-darwin --config src-tauri/tauri.dev.conf.json --verbose