This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
66 lines (60 loc) · 1.73 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
---
name: Build Kernel Package
# yamllint disable-line rule:truthy
on:
[push, pull_request]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: 'Checkout repo'
uses: actions/checkout@v2
- name: 'Set up Python 3.9'
uses: actions/setup-python@v2
- name: 'Install dependencies'
run: |
python -m pip install --upgrade pip
pip install yamllint
sudo apt-get install shellcheck bash
- name: 'Analysing the code'
run: |
yamllint .
shellcheck ./*.sh
build:
needs: [lint]
runs-on: ubuntu-20.04
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v2
- name: Build script
id: build
run: |
mkdir /tmp/artifacts
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
REL=$(./next_version.sh mbp)
echo Building $VERSION-$REL
echo "::set-output name=tag::${VERSION}-${REL}"
sudo ./build.sh
cd /tmp/artifacts
ls -l
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
ls -l
- name: Upload package artifact
uses: actions/upload-artifact@v2
with:
name: linux-mbp-${{ steps.build.outputs.tag }}
path: /tmp/artifacts/*
- name: Release
if: |
github.ref == 'refs/heads/master' ||
github.ref == 'release/*'
uses: softprops/action-gh-release@v1
with:
data: |
/tmp/artifacts/Packages.gz
/tmp/artifacts/sha256
/tmp/artifacts/*.deb
tag_name: v${{ steps.build.outputs.tag }}
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}