-
Notifications
You must be signed in to change notification settings - Fork 2
177 lines (137 loc) · 3.76 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: CI
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- 'docs/**'
release:
types:
- published
pull_request:
paths-ignore:
- 'docs/**'
jobs:
root_fs:
runs-on: ubuntu-latest
env:
VERSION: ${{github.event.release.tag_name}}
steps:
- uses: actions/checkout@v4
- name: Populate config
run: |
echo "VERSION_ID=$GITHUB_SHA" >> src/etc/qmk-release
echo "VERSION=${VERSION:-2.0.0}" >> src/etc/qmk-release
- name: Build Docker image
run: |
docker build -t qmkfm/qmk_distro_wsl .
- name: Export Docker image
run: |
docker export $(docker create qmkfm/qmk_distro_wsl:latest) | gzip > .build/install.tar.gz
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: .build/*
drivers:
runs-on: ubuntu-latest
steps:
- uses: Legion2/[email protected]
with:
repository: qmk/qmk_driver_installer
tag: 'latest'
path: .build/
file: qmk_driver_installer.exe
- name: Download Config
run: |
sudo wget -P .build/ https://raw.githubusercontent.com/qmk/qmk_firmware/master/util/drivers.txt
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: .build/*
launcher:
runs-on: ubuntu-latest
steps:
- uses: Legion2/[email protected]
with:
repository: yuk7/wsldl
tag: '22020900'
path: .build/
file: wsldl.exe
- name: Configure Launcher
run: |
sudo mv .build/wsldl.exe .build/QMK.exe
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: .build/*
build:
runs-on: windows-latest
needs: [root_fs, launcher, drivers]
env:
VERSION: ${{github.event.release.tag_name}}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifacts
path: .build
- name: Create Installer
shell: 'bash {0}'
run: |
iscc installer/install.iss //DMyAppVersion=${VERSION:-0.0.0}
sha256sum .build/QMK_WSL.exe > .build/QMK_WSL.exe.sha256
- uses: actions/upload-artifact@v3
with:
name: installer
path: .build/QMK_WSL.*
- uses: geekyeggo/delete-artifact@v2
with:
name: artifacts
test:
runs-on: windows-latest
needs: [build]
steps:
- uses: actions/download-artifact@v3
with:
name: installer
- name: Run Install
run: |
Start-Process QMK_WSL.exe -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART" -wait
- name: Run QMK cli
shell: cmd
run: |
wsl -d QMK -u root -- bash -c "qmk -h | grep 'CLI wrapper for running QMK commands'"
publish_release:
runs-on: ubuntu-latest
needs: [test]
if: github.event.release.tag_name
steps:
- uses: actions/download-artifact@v3
with:
name: installer
path: .build
- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ github.event.release.name }}
files: |
.build/*
publish_beta:
runs-on: ubuntu-latest
needs: [test]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/download-artifact@v3
with:
name: installer
path: .build
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "beta"
prerelease: true
title: "Latest Beta"
files: |
.build/*