From 44f4d691a066624ff17314df5f39baad70e8d3a0 Mon Sep 17 00:00:00 2001 From: John Sanpe Date: Tue, 10 Oct 2023 02:31:32 +0800 Subject: [PATCH] added release packets Signed-off-by: John Sanpe --- .github/workflows/build.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0689cce..2ee8b8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + + - name: Setup variables + run: | + echo RELEASE=$(date +%Y\/%m\/%d) >> $GITHUB_ENV + - name: Install dependencies run: | sudo apt update @@ -27,7 +32,34 @@ jobs: libncurses5-dev bison flex libssl-dev device-tree-compiler \ gcc-arm-none-eabi gcc-aarch64-linux-gnu bc libfdt-dev \ libarchive-tools arch-install-scripts qemu-user-static + - name: Initialization submodule run: git submodule update --init + - name: Build packets - run: sudo bash build.sh + run: sudo bash ${{github.workspace}}/build.sh + + - name: Create release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + body: ${{env.RELEASE}} + tag_name: ${{env.RELEASE}} + draft: false + prerelease: false + files: | + ${{github.workspace}}/aboot.img + ${{github.workspace}}/boot.img + ${{github.workspace}}/rootfs.img.zst + ${{github.workspace}}/aboot.img.sha256sum + ${{github.workspace}}/boot.img.sha256sum + ${{github.workspace}}/rootfs.img.zst.sha256sum + + - name: Delete old releases + uses: dev-drprasad/delete-older-releases@v0.2.0 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + keep_latest: 1 + delete_tags: true