forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 26
65 lines (57 loc) · 1.98 KB
/
build.yaml
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
on: [push]
env:
RELEASE_START: 1150 # 1150, as this is latest build by GitLab CI
jobs:
build:
runs-on: [self-hosted, Linux, ARM64]
container: ayufan/rock64-dockerfiles:bookworm
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Docker binary
run: |
apt-get -y update
apt-get -y install docker.io
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Configure ccache
run: echo "CCACHE_DIR=${{ env.RUNNER_TEMP }}/ccache" >> $GITHUB_ENV
- name: Reset ccache statistics
run: ccache -M 0 -F 0
- name: Build package
run: |
export RELEASE=$(($RELEASE_START+$GITHUB_RUN_NUMBER))
./dev-make kernel-package
- name: Release package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
export RELEASE=$(($RELEASE_START+$GITHUB_RUN_NUMBER))
export RELEASE_NAME="$(./dev-make version)"
export RELEASE_TITLE="$(./dev-make version)"
export DESCRIPTION="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
github-release release \
--tag "${RELEASE_NAME}" \
--name "${RELEASE_TITLE}" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--description "${DESCRIPTION}" \
--target "${GITHUB_SHA}" \
--draft
sleep 3s # allow to update release
for i in ../*$(./dev-make info)*.deb; do
github-release upload \
--tag "${RELEASE_NAME}" \
--name "$(basename "${i}")" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--file "${i}"
done
github-release edit \
--tag "${RELEASE_NAME}" \
--name "${RELEASE_TITLE}" \
--user "${GITHUB_REPOSITORY%/*}" \
--repo "${GITHUB_REPOSITORY#*/}" \
--description "${DESCRIPTION}"
rm ../*$(./dev-make info)*.deb