Skip to content

Commit 5ed3728

Browse files
committed
Add workflow for CI
Signed-off-by: inferno0230 <[email protected]>
1 parent 664bf47 commit 5ed3728

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/build.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: WSL2 Kernel
2+
3+
on:
4+
push:
5+
branches:
6+
- linux-msft-wsl-6.1.y
7+
workflow_dispatch:
8+
9+
jobs:
10+
WSL2_Kernel_Build:
11+
name: Build kernel
12+
runs-on: self-hosted
13+
steps:
14+
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
20+
- name: Build Kernel
21+
run: |
22+
./build.sh
23+
echo "RELEASE_NAME=WSL2-Linux-v6.1.$(grep "^SUBLEVEL =" Makefile | awk '{print $3}')-$(date +"%Y%m%d")" >> $GITHUB_ENV
24+
25+
- name: Creating release
26+
run: |
27+
gh release create $RELEASE_NAME --title "$RELEASE_NAME" --notes "" out/${RELEASE_NAME}.zip

build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ fi
7575
}
7676

7777
make_zip(){
78-
zip_name="WSL2-Linux-v6.1.$(grep "^SUBLEVEL =" Makefile | awk '{print $3}')-$(date +"%Y%m%d-%H%M").zip"
79-
zip out/$zip_name $KERNEL_PATH/out/arch/$ARCH/boot/bzImage
78+
zip_name="WSL2-Linux-v6.1.$(grep "^SUBLEVEL =" Makefile | awk '{print $3}')-$(date +"%Y%m%d").zip"
79+
cd $KERNEL_PATH
80+
zip out/$zip_name out/arch/$ARCH/boot/bzImage
8081
echo -e "${green}out: ${KERNEL_PATH}/out/${zip_name}${clear}"
8182
echo -e "${clear}"
8283
echo -e "${green}Completed in $(($(date +%s) - start)) seconds.${clear}"

0 commit comments

Comments
 (0)