mirror of
https://github.com/AuxXxilium/synology-igc.git
synced 2024-11-23 15:01:06 +07:00
add auto build (#5)
This commit is contained in:
parent
dbeae8de9c
commit
3dff3bb13d
62
.github/workflows/build.yml
vendored
Normal file
62
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
# Copyright (C) 2022 Ing <https://github.com/wjz304>
|
||||
#
|
||||
# This is free software, licensed under the MIT License.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [apollolake, broadwell, broadwellnk, denverton, geminilake, v1000]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: Init Env
|
||||
run : |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
echo "release_tag=$(date +"%Y.%m.%d-%H%M")" >> $GITHUB_ENV
|
||||
|
||||
- name: Build igc for ${{matrix.platform}}
|
||||
run : |
|
||||
mkdir ./${{matrix.platform}} && chmod 777 ./${{matrix.platform}}
|
||||
sudo docker run -u 1000 --rm -t -v "${PWD}":/input -v "${PWD}/${{matrix.platform}}":/output fbelavenuto/syno-compiler compile-module ${{matrix.platform}}
|
||||
|
||||
ls -al ${PWD}/${{matrix.platform}}
|
||||
tar zcvf igc-${{matrix.platform}}.tgz -C./${{matrix.platform}}/ .
|
||||
|
||||
- name: Upload firmware to release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: (!cancelled())
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.release_tag }}
|
||||
files: ./igc*.tgz
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@v2
|
||||
with:
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 9
|
||||
|
||||
- name: Remove old Releases
|
||||
uses: dev-drprasad/delete-older-releases@v0.1.0
|
||||
with:
|
||||
keep_latest: 9
|
||||
delete_tags: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user