generated from ZanzyTHEbar/SolidJSTauri
-
-
Notifications
You must be signed in to change notification settings - Fork 5
145 lines (130 loc) · 4.83 KB
/
build.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: App Builder
on:
workflow_dispatch:
push:
tags:
- 'v*'
branches:
- master
- main
- release
- develop
- beta
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_TOOLCHAIN_VERSION: 1.79.0
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-22.04]
node-version: [18.x]
include:
- platform: ubuntu-22.04
rust_target: x86_64-unknown-linux-gnu
- platform: windows-latest
rust_target: x86_64-pc-windows-msvc
# - platform: macos-latest
# rust_target: x86_64-apple-darwin
# - platform: macos-latest
# rust_target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}
- name: Node.js setup ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# node-version-file: '.nvmrc'
- name: 'Setup Rust'
uses: actions-rs/toolchain@v1
with:
default: true
override: true
profile: minimal
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
target: ${{ matrix.rust_target }}
- uses: Swatinem/rust-cache@v2
- name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y javascriptcoregtk-4.1 libsoup-3.0 libwebkit2gtk-4.0-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev webkit2gtk-4.0 libappindicator3-dev patchelf libsoup2.4-dev
npm install -g pnpm
npm install -g typescript
- name: install dependencies (windows only)
if: matrix.os == 'windows-latest'
run: |
npm install -g typescript
npm install -g pnpm
- name: install dependencies (macos only)
if: matrix.os == 'macos-latest'
run: |
brew install pnpm
- name: Install dependencies (PNPM)
run: pnpm install --no-frozen-lockfile
- name: Generate Local Plugins (PNPM)
run: pnpm run specta:gen
- uses: JonasKruckenberg/[email protected]
id: tauri_build
with:
target: ${{ matrix.rust_target }}
- uses: actions/upload-artifact@v4
with:
name: production-files
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}"
deploy:
runs-on: ubuntu-latest
name: Deploy
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Directory
run: mkdir -p dist
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: production-files
path: ./dist
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
# remember to update the conventionalcommits version when updating semantic relese
- run: npm install -g conventional-changelog-conventionalcommits@8
- run: npm install -g [email protected]
- run: npm install -g @semantic-release/exec
- run: npm install -g @semantic-release/git
- run: npm install -g @semantic-release/release-notes-generator
- run: npm install -g @semantic-release/changelog
- run: npm install -g @semantic-release/github
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get install -y jq
chmod +x ./.github/scripts/prepareCMD.sh
semantic-release
cleanup:
name: Cleanup actions
needs:
- deploy
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: '♻️ remove build artifacts'
uses: geekyeggo/delete-artifact@v5
with:
name: production-files