-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (135 loc) · 4.38 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
name: 'Development Build'
on:
push:
branches:
- develop
paths:
- scripts/**
- src/**
- src-tauri/**
- .github/workflows/**
- angular.json
- tsconfig.json
- tsconfig.app.json
- package.json
- CHANGELOG.md
permissions: write-all
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@v1
with:
node-version: 16
- name: Install NodeJS dependencies
run: npm install
- name: Set app version to DEV version
run: npm run set-version DEV
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: Unreleased
path: ./CHANGELOG.md
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
# - name: install dependencies (ubuntu only)
# if: matrix.platform == 'ubuntu-20.04'
# run: |
# sudo apt-get update
# sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Configure Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
src-shared
src-elevated-sidecar
src-tauri
- name: Delete new development release and tag if they exist
uses: dev-drprasad/[email protected]
continue-on-error: true
with:
delete_release: true
tag_name: ibcontrol-vDEV-new
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: Raphiiko/tauri-action@dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: ibcontrol-vDEV-new
releaseName: IBControl Development Build
releaseBody: ${{ steps.changelog_reader.outputs.changes }}
releaseDraft: false
prerelease: true
includeDebug: true
includeRelease: false
- name: Get current development release ID if it exists
uses: actions/github-script@v6
continue-on-error: true
id: get-current-release-id
with:
script: |
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "ibcontrol-vDEV"
})
return release.data.id
- name: Get new development release ID
uses: actions/github-script@v6
id: get-new-release-id
with:
script: |
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "ibcontrol-vDEV-new"
})
return release.data.id
- name: Delete current development release and tag if they exist
uses: dev-drprasad/[email protected]
continue-on-error: true
with:
delete_release: true # default: false
tag_name: ibcontrol-vDEV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create development tag on current commit
uses: EndBug/latest-tag@latest
with:
ref: ibcontrol-vDEV
- name: Set new tag on new development release
uses: actions/github-script@v6
env:
release_id: ${{ steps.get-new-release-id.outputs.result }}
with:
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.release_id,
tag_name: "ibcontrol-vDEV"
})
- name: Delete temporary development tag
uses: dev-drprasad/[email protected]
with:
tag_name: ibcontrol-vDEV-new
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}