Repository navigation
114 lines (98 loc) · 4.08 KB
/
Copy pathmain.yml
File metadata and controls
114 lines (98 loc) · 4.08 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# This is a basic workflow to help you get started with Actions
name: CI
env:
bundle_app_name_prefix: justrunmydebugger
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest no one to support
build: [debug, release]
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: 'node_modules'
key: ${{ runner.os }}-modules-${{ matrix.build }}-${{ hashFiles('package.json') }}
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
!src-tauri/target/bundle
key: ${{ runner.os }}-cargo-${{ matrix.build }}-${{ hashFiles('src-tauri/Cargo.toml') }}
- name: Install system dependencies for Tauri
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libappindicator3-dev \
patchelf \
librsvg2-dev \
libappindicator-dev \
patchelf \
librsvg2-dev
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "No need additional Tauri dependencies for $RUNNER_OS"
exit 0
elif [ "$RUNNER_OS" == "macOS" ]; then
echo "No need additional Tauri dependencies for $RUNNER_OS"
exit 0
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Fetch dependencies
run: yarn install # will run `yarn install` command
- name: Build debug variant
run: yarn build:bundle
if: matrix.build == 'debug'
- name: Build release variant
run: yarn build:prod:bundle
if: matrix.build == 'release'
- name: Archive ${{ matrix.build }} DEB artifacts
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: ${{ env.bundle_app_name_prefix }}-bundle-${{ matrix.build }}-${{ matrix.os }}-deb
path: |
src-tauri/target/${{ matrix.build }}/bundle/deb/${{ env.bundle_app_name_prefix }}_*_*.*
- name: Archive ${{ matrix.build }} AppImage artifacts
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: ${{ env.bundle_app_name_prefix }}-bundle-${{ matrix.build }}-${{ matrix.os }}-appimage
path: |
src-tauri/target/${{ matrix.build }}/bundle/appimage/${{ env.bundle_app_name_prefix }}_*_*.*
- name: Archive ${{ matrix.build }} MSI artifacts
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
with:
name: ${{ env.bundle_app_name_prefix }}-bundle-${{ matrix.build }}-${{ matrix.os }}-msi
path: |
src-tauri/target/${{ matrix.build }}/bundle/msi/${{ env.bundle_app_name_prefix }}_*_*.*