Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lzghzr committed May 19, 2024
1 parent 0096f7a commit 8c186e6
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build-kpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Build CI

on:
push:
paths:
- ".github/workflows/build-kpm.yml"
- "**.c"

workflow_dispatch:
inputs:
release:
description: 'Push a new release'
required: false
default: 'false'
version:
description: 'release version'
required: false
default: '2024051900'

jobs:
Build-on-Ubuntu:
runs-on: ubuntu-latest
permissions:
contents: write
env:
TZ: UTC-8

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 1

- name: Update system and install dependencies
run: |
sudo apt update -y
sudo apt install llvm -y
- name: Build kpm
run: |
mkdir target
for dir in $(ls -d */ | grep -v '^KernelPatch/$'); do
make -C ${dir}
mv ${dir}*.kpm target
done
- name: Upload artifact
if: success()
uses: lzghzr/upload-artifact@405e6269d5b1feb22bf2a044deb7950596bed6da
with:
path: "target/*.kpm"
artifact-per-file: true
artifact-name-rule: ${name}

- name: Upload release
if: github.event.inputs.release == 'true' && success() && !cancelled()
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.event.inputs.version }}
tag: ${{ github.event.inputs.version }}
body: This release is built by github-action.
artifacts: "target/*.kpm"
allowUpdates: true
makeLatest: true
omitBodyDuringUpdate: true
replacesArtifacts: true

0 comments on commit 8c186e6

Please sign in to comment.