-
Notifications
You must be signed in to change notification settings - Fork 23
59 lines (49 loc) · 1.65 KB
/
Copy pathbuild.yml
File metadata and controls
59 lines (49 loc) · 1.65 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
name: Build and Release
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
version:
description: 'Release Version (e.g., v3.1)'
required: true
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Ubuntu RootFS
run: |
cd Docker
VERSION="${{ github.event.inputs.version || github.ref_name }}" ./build.sh
- name: Prepare Package
run: |
# Get version
VERSION="${{ github.event.inputs.version || github.ref_name }}"
DATE=$(date +%Y%m%d)
ZIP_NAME="Ubuntu-Chroot-${VERSION}-${DATE}.zip"
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
# Clean the repository
rm -rf .git .github .gitignore .gitattributes
find . -name ".git*" -delete
- name: Create Zip Archive
run: |
zip -r -9 "${{ env.ZIP_NAME }}" . -x "Docker/*"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: kernelsu-module
path: ${{ env.ZIP_NAME }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.ZIP_NAME }}"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.version || github.ref_name }}
name: "Ubuntu Chroot ${{ github.event.inputs.version || github.ref_name }}"
body: |
Ubuntu Chroot Environment ${{ github.event.inputs.version || github.ref_name }}
Flashable KernelSU module for Ubuntu ARM64 chroot environment.