-
-
Notifications
You must be signed in to change notification settings - Fork 22
146 lines (144 loc) · 4.91 KB
/
build-development.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
146
name: 'Development Build'
on:
push:
branches:
- develop
jobs:
build-dev-release:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 20.15
cache: npm
- name: Initialize the project
run: npm run ci
- name: Lint Angular project
run: npm run lint
- name: Set app version to DEV version
run: npm run set-version DEV
- name: Set flavour to DEV
run: npm run set-flavour DEV
- name: Set build id
run: npm run set-build-id
- name: Setup LLVM
uses: ZhongRuoyu/setup-llvm@v0
with:
github-token: ${{ github.token }}
llvm-version: 17
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.2
default: true
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
src-shared-rust
src-elevated-sidecar
src-core
# - name: Install development Tauri CLI
# run: cargo install --git https://github.com/tauri-apps/tauri --branch 1.x tauri-cli
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: Unreleased
path: ./CHANGELOG.md
- name: Build and release OyasumiVR development build
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
releaseId: 102092545
tagName: oyasumi-vDEV
releaseDraft: false
prerelease: true
includeDebug: true
includeRelease: false
includeUpdaterJson: true
# tauriScript: cargo-tauri
- name: Update release data
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log("Deleting existing oyasumi-vDEV tag...");
try {
await github.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/oyasumi-vDEV"
})
console.log("Deleted existing oyasumi-vDEV tag!");
} catch (e) {
console.log("The oyasumi-vDEV tag doesn't exist yet: " + e)
}
console.log("Recreating oyasumi-vDEV tag on current commit...");
try {
await github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/oyasumi-vDEV",
sha: context.sha
})
console.log("Recreated oyasumi-vDEV tag!");
} catch (e) {
console.log("Could not recreate oyasumi-vDEV tag: " + e)
}
console.log("Updating release data...");
try {
await github.request('PATCH /repos/Raphiiko/OyasumiVR/releases/102092545', {
tag_name: 'oyasumi-vDEV',
name: 'OyasumiVR Development Build',
body: `${{ steps.changelog_reader.outputs.changes }}`,
draft: false,
prerelease: true
})
console.log("Updated release data!");
} catch (e) {
console.log("Could not update release data: " + e)
}
- name: Sleep for 5 seconds
run: Start-Sleep -s 5
shell: powershell
- name: Publish release if needed
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log("Publishing release...");
try {
await github.request('PATCH /repos/Raphiiko/OyasumiVR/releases/102092545', {
draft: false
})
console.log("Published release!");
} catch (e) {
console.log("Could not publish release: " + e)
}
- name: Update the update manifest
uses: Raphiiko/actions-deploy-gist@main
with:
token: ${{ secrets.GH_TOKEN_GIST }}
gist_id: 8af3d105fe9a59db304cca2cfea216c8
file_path: latest.json
gist_file_name: 'oyasumi_update_manifest_dev.json'
gist_description: OyasumiVR Update Manifest [Development Channel]