-
Notifications
You must be signed in to change notification settings - Fork 10
94 lines (75 loc) · 2.58 KB
/
publish.yml
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
name: 'Publish mCal'
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-binaries:
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Yangon"
timezoneMac: "Asia/Yangon"
timezoneWindows: "Myanmar Standard Time"
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8.6.2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- uses: JonasKruckenberg/tauri-build@v1
id: tauri_build
- name: Unix like list files in dist directory
if: ${{matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest' }}
run: ls
- name: Windows like list files in dist directory
if: ${{matrix.platform == 'windows-latest'}}
run: dir
- name: Upload artifact to macOS
if: ${{ matrix.platform == 'macos-latest' }}
uses: actions/upload-artifact@v3
with:
name: MacOS (DMG)
path: |
./apps/myanmar_calendar/src-tauri/target/release/bundle/dmg/*.dmg
- name: Upload artifact to linux
if: ${{ matrix.platform == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
with:
name: Linux (DEB & AppImage)
path: |
./apps/myanmar_calendar/src-tauri/target/release/bundle/deb/*.deb
./apps/myanmar_calendar/src-tauri/target/release/bundle/appimage/*.AppImage
- name: Upload artifact to Window
if: ${{ matrix.platform == 'windows-latest' }}
uses: actions/upload-artifact@v3
with:
name: Windows (MSI & NSIS)
path: |
./apps/myanmar_calendar/src-tauri/target/release/bundle/msi/*.msi
./apps/myanmar_calendar/src-tauri/target/release/bundle/nsis/*.exe