-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.1 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
name: "Build Reflash"
on:
push:
branches:
- main
- enhancement/*
tags:
- 'v*'
env:
TERM: xterm-256color
jobs:
package:
runs-on: self-hosted
steps:
- name: Make filename
run: echo "VERSION=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Use tag if tagged
if: startsWith(github.ref, 'refs/tags/')
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Use Node.js '18'
uses: actions/setup-node@v3
with:
node-version: 18
- name: install and build usb version
working-directory: ./client
run: |
npm ci
npm run build
- name: Make archive with version file
run: |
make build-go
- name: Make image
run: |
make docker
mv output/*.img.xz .
- name: Release if tagged
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
allowUpdates: true
artifacts: "reflash-*.img.xz"
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true