-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (70 loc) · 3.08 KB
/
ci.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
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Get the commit id with 8 chars
id: get_version_8
shell: bash
run: echo "SHA8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: install pnpm
run: npm install -g pnpm
- name: get version
shell: bash
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install app dependencies and build it
run: pnpm install && pnpm tauri build
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload deb artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-22.04'
with:
name: jwt-explorer_${{ env.SHA8 }}_amd64.deb
path: src-tauri/target/release/bundle/deb/jwt-explorer_${{ env.PACKAGE_VERSION }}_amd64.deb
- name: upload AppImage artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-22.04'
with:
name: jwt-explorer_${{ env.SHA8 }}_amd64.AppImage
path: src-tauri/target/release/bundle/appimage/jwt-explorer_${{ env.PACKAGE_VERSION }}_amd64.AppImage
- name: upload MSI artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'windows-latest'
with:
name: jwt-explorer_${{ env.SHA8 }}_x64_en-US.msi
path: src-tauri/target/release/bundle/msi/jwt-explorer_${{ env.PACKAGE_VERSION }}_x64_en-US.msi
- name: upload app artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'macos-latest'
with:
name: jwt-explorer_${{ env.SHA8 }}.app
path: src-tauri/target/release/bundle/macos/jwt-explorer.app
- name: upload dmg artifact
uses: actions/upload-artifact@v3
if: matrix.platform == 'macos-latest'
with:
name: jwt-explorer_${{ env.SHA8 }}_x64.dmg
path: src-tauri/target/release/bundle/dmg/jwt-explorer_${{ env.PACKAGE_VERSION }}_x64.dmg