-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (68 loc) · 2.28 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
name: Build
on:
workflow_dispatch:
push:
tags:
- "sling-*"
- "dev-*"
- "release-*"
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: satackey/action-docker-layer-caching@v0.0.8
- name: install brickstrap
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends libguestfs-tools qemu-user-static binfmt-support
curl -LO https://raw.githubusercontent.com/ev3dev/brickstrap/master/src/brickstrap.sh
- name: build sling and sinter
run: ./build_sling.sh
- name: build qrcode generator
run: ./build_qrcode.sh
- name: build control panel
run: ./build_control_panel.sh
- name: build uuidtob62
run: ./build_uuidtob62.sh
- name: check the outputs
run: |
file build-ev3/sling \
build-ev3/sinter_host \
build-ev3/executables/show_qrcode \
build-ev3/executables/service_control \
build-ev3/executables/uuidtob62
- name: make vmlinuz readable
run: sudo chmod 755 /boot/vmlinuz*
- name: build image
run: ./build_image.sh
- uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
name: image
path: ev3-source.img.zip
if-no-files-found: error
- id: create_release
uses: actions/create-release@v1
if: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ""
draft: true
- id: tag_name
if: ${{ github.event_name == 'push' }}
run: echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ev3-source.img.zip
asset_name: ev3-source-${{ steps.tag_name.outputs.TAG_NAME }}.img.zip
asset_content_type: application/zip