From 2a37cc998ab5c3224b47217601c91d530931f0ca Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Wed, 16 Nov 2022 02:31:06 -0500 Subject: [PATCH] Optimize CI auto-build --- .github/workflows/main.yml | 28 +++------------------------- buildme | 6 ++---- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c8d43665..00e86a052 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,23 +4,19 @@ on: push: pull_request: workflow_dispatch: - release: - types: [published] jobs: build-macos: name: Build Clover Release runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Manage Version run: | git fetch --prune --unshallow --tags echo "CUR_TAG=$(git tag -l | tail -1)" >> $GITHUB_ENV echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - name: Update CloverHackyColor/OpenCorePkg fork - run: git submodule init && git submodule update - name: Install Dependencies run: brew install p7zip @@ -36,32 +32,14 @@ jobs: run: | (cd "CloverPackage/CloverV2/EFI/CLOVER/" && zip -q "CLOVERX64.efi.zip" "CLOVERX64.efi" || exit 1) (cd "CloverPackage/sym/CloverISO-${{ env.CUR_TAG }}" && 7z a Clover-${{ env.CUR_TAG }}-X64.iso.7z *.iso || exit 1) - releaseItems=(CloverPackage/sym/CloverISO*/*.7z CloverPackage/sym/Clover.app*.pkg CloverPackage/sym/CloverV2*.zip CloverPackage/CloverV2/EFI/CLOVER/CLOVERX64.efi.zip CloverPackage/sym/Clover_r*.pkg) + releaseItems=(CloverPackage/sym/CloverISO*/*.7z CloverPackage/sym/CloverV2*.zip CloverPackage/CloverV2/EFI/CLOVER/CLOVERX64.efi.zip CloverPackage/sym/Clover_r*.pkg) for releaseItem in "${releaseItems[@]}"; do cp -Rf "${releaseItem}" ./ || exit 1; done - - name: Generate Release Notes - run: | - echo "Recent commit descriptions are:" >> ReleaseNotes.md - git log $(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))..HEAD --oneline --format=" - %s" | head -10 >> ReleaseNotes.md - echo '' >> ReleaseNotes.md - /usr/bin/sed -i "" "s:sym/Clover:Clover:g" CloverPackage/sym/Clover*.md5 - cat CloverPackage/sym/Clover*.md5 >> ReleaseNotes.md - name: Upload to Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Clover beta-${{ env.GIT_SHA }} path: | *.7z - Clover.app*.pkg CloverV2*.zip CLOVERX64.efi.zip Clover_r*.pkg - # - name: Upload to Release - # if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - # uses: ncipollo/release-action@v1 - # with: - # artifacts: ./*.7z, ./Clover.app*.pkg, ./CloverV2*.zip, ./CLOVERX64.efi.zip, ./Clover_r*.pkg - # bodyFile: ReleaseNotes.md - # name: Release v5.1 r${{ env.CUR_TAG }} - # prerelease: false - # tag: ${{ env.CUR_TAG }} - # token: ${{ secrets.GITHUB_TOKEN }} diff --git a/buildme b/buildme index a05d3281f..d8f511314 100755 --- a/buildme +++ b/buildme @@ -786,14 +786,12 @@ menu clone_OpenCorePkg set -e if [[ "$2" == ci ]]; then - clone_OpenCorePkg - buildClover + makeRelease buildCCPV BLC buildPkg buildIso - buildApp + makeV2 else - clone_OpenCorePkg menu fi