Skip to content

Commit 2ba803f

Browse files
committed
Update build.yml
1 parent a0f78aa commit 2ba803f

File tree

1 file changed

+19
-40
lines changed

1 file changed

+19
-40
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,24 @@ jobs:
1414
matrix:
1515
include:
1616
- os: ubuntu-22.04
17-
target: x86_64-unknown-linux-gnu
17+
artifact: build/bin/self-ledger
1818
- os: windows-latest
19-
target: x86_64-pc-windows-msvc
19+
artifact: build/bin/self-ledger.exe
2020
- os: macos-latest
21-
target: x86_64-apple-darwin
21+
artifact: build/bin/self-ledger-macos.zip
2222

2323
runs-on: ${{ matrix.os }}
2424

2525
steps:
2626
- uses: actions/checkout@v4
2727

28-
- name: Install Rust
29-
uses: dtolnay/rust-toolchain@stable
28+
- name: Install Go
29+
uses: actions/setup-go@v5
3030
with:
31-
targets: ${{ matrix.target }}
31+
go-version: '1.22'
32+
33+
- name: Install Wails
34+
run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.12.0
3235

3336
- name: Install Bun
3437
uses: oven-sh/setup-bun@v2
@@ -37,50 +40,26 @@ jobs:
3740
if: matrix.os == 'ubuntu-22.04'
3841
run: |
3942
sudo apt-get update
40-
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
43+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev
4144
4245
- name: Install frontend dependencies
46+
working-directory: frontend
4347
run: bun install
4448

45-
- name: Install linuxdeploy
46-
if: matrix.os == 'ubuntu-22.04'
47-
run: |
48-
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
49-
chmod +x linuxdeploy-x86_64.AppImage
50-
sudo mv linuxdeploy-x86_64.AppImage /usr/local/bin/linuxdeploy
51-
52-
- name: Set version from tag
53-
shell: bash
54-
run: |
55-
VERSION="${{ github.ref_name }}"
56-
VERSION="${VERSION#v}"
57-
sed -i.bak "s/\"version\": \"[^\"]*\"/\"version\": \"${VERSION}\"/" src-tauri/tauri.conf.json
58-
rm -f src-tauri/tauri.conf.json.bak
59-
6049
- name: Build
61-
run: bunx tauri build
62-
env:
63-
APPIMAGE_EXTRACT_AND_RUN: 1
50+
run: wails build
51+
52+
- name: Package macOS app bundle
53+
if: matrix.os == 'macos-latest'
54+
run: zip -r build/bin/self-ledger-macos.zip build/bin/self-ledger.app
6455

65-
- name: Upload artifacts
56+
- name: Upload artifact
6657
uses: actions/upload-artifact@v4
6758
with:
6859
name: self-ledger-${{ github.ref_name }}-${{ matrix.os }}
69-
path: |
70-
src-tauri/target/release/bundle/deb/*.deb
71-
src-tauri/target/release/bundle/rpm/*.rpm
72-
src-tauri/target/release/bundle/appimage/*.AppImage
73-
src-tauri/target/release/bundle/msi/*.msi
74-
src-tauri/target/release/bundle/nsis/*.exe
75-
src-tauri/target/release/bundle/dmg/*.dmg
60+
path: ${{ matrix.artifact }}
7661

7762
- name: Release
7863
uses: softprops/action-gh-release@v2
7964
with:
80-
files: |
81-
src-tauri/target/release/bundle/deb/*.deb
82-
src-tauri/target/release/bundle/rpm/*.rpm
83-
src-tauri/target/release/bundle/appimage/*.AppImage
84-
src-tauri/target/release/bundle/msi/*.msi
85-
src-tauri/target/release/bundle/nsis/*.exe
86-
src-tauri/target/release/bundle/dmg/*.dmg
65+
files: ${{ matrix.artifact }}

0 commit comments

Comments
 (0)