-
Notifications
You must be signed in to change notification settings - Fork 17
65 lines (54 loc) · 1.57 KB
/
release.yml
File metadata and controls
65 lines (54 loc) · 1.57 KB
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
name: Release
on: [workflow_dispatch]
jobs:
build-and-test-all:
uses: ./.github/workflows/build-and-test-all.yml
release:
runs-on: ubuntu-22.04
needs: [build-and-test-all]
permissions:
contents: write
steps:
- name: Download kernel artifacts
uses: actions/download-artifact@v4
with:
pattern: kernel-artifacts-*
merge-multiple: true
path: kernel-artifacts
- name: Download rootfs artifacts
uses: actions/download-artifact@v4
with:
pattern: rootfs-*
merge-multiple: true
path: rootfs
- run: ls -lR
- name: Compute hashsums and create hashsums.txt
shell: bash
run: |
shopt -s extglob
(cd kernel-artifacts && sha256sum !(*.deb)) > hashsums.txt
(cd rootfs && sha256sum *) >> hashsums.txt
- name: Set output variables
id: vars
run: |
set -x
SHORT_HASH=${GITHUB_SHA:0:7}
DATE=$(date +'%Y.%m.%d')
echo "SUFFIX=${DATE}-${SHORT_HASH}" >> $GITHUB_OUTPUT
- name: Publish release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: ${{ steps.vars.outputs.SUFFIX }}
files: |
kernel-artifacts/vmlinux*
kernel-artifacts/Image*
kernel-artifacts/bzImage*
rootfs/*
hashsums.txt
- name: Publish header release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: linux-headers-${{ steps.vars.outputs.SUFFIX }}
files: kernel-artifacts/linux-headers-*.deb