-
-
Notifications
You must be signed in to change notification settings - Fork 32
102 lines (92 loc) · 3.2 KB
/
build.yaml
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
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published] # has GITHUB_REF as refs/tags/<tag_name>
jobs:
build:
permissions:
contents: write
strategy:
fail-fast: true
matrix:
os:
# - macos-latest
- ubuntu-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# - name: Setup Rust cache
# uses: actions/cache@v4
# with:
# key: ${{ matrix.os }}-${{ hashFiles('src-tauri/Cargo.lock') }}
# path: |
# ~/.cargo
- name: Set up cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.12.2
cache: yarn
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
# - name: 🦀 Install Rust
# uses: actions-rs/toolchain@v1
# with: { toolchain: stable }
# - name: Install webkit2gtk (ubuntu only)
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo apt-get update
# sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# - name: Install Node.js dependencies
# run: yarn install
# - name: Test build
# uses: tauri-apps/tauri-action@v0
# if: (!startsWith(github.ref, 'refs/tags/v'))
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
# - name: Build the app
# if: startsWith(github.ref, 'refs/tags/v')
# uses: tauri-apps/tauri-action@v0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
# # ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
# # 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 }}
# with:
# tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
# releaseName: 'herocast v__VERSION__'
# prerelease: false
# - name: Upload release artifacts
# if: startsWith(github.ref, 'refs/tags/v')
# uses: actions/upload-artifact@v3
# with:
# name: release-${{ matrix.os }}
# path: |
# src-tauri/target/release/**/*
- name: Sentry Release
if: github.ref == 'refs/heads/main'
uses: getsentry/action-release@v1.7.0
with:
ignore_missing: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}