Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 65 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,22 @@ on:
- '*'
pull_request:
workflow_dispatch:
inputs:
alpha_build:
description: 'Publish as Clover-Build-Alpha rolling_release'
required: false
default: true
type: boolean

jobs:
build-macos:
name: Build Clover Release
runs-on: macos-latest
permissions:
contents: write
concurrency:
group: ${{ ((github.event_name == 'workflow_dispatch' && inputs.alpha_build == true) || (github.event_name == 'push' && github.ref == 'refs/heads/master')) && 'clover-alpha-release' || format('build-{0}', github.run_id) }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -60,7 +69,20 @@ jobs:
CLOVERX64.efi.zip
Clover_r*.pkg

- name: Publish Release
- name: Verify Release Assets
run: |
shopt -s nullglob
missing=()
for pattern in '*.7z' 'CloverV2*.zip' 'CLOVERX64.efi.zip' 'Clover_r*.pkg'; do
files=($pattern)
if [ ${#files[@]} -eq 0 ]; then missing+=("$pattern"); fi
done
if [ ${#missing[@]} -gt 0 ]; then
echo "::error::Missing expected release artifact(s): ${missing[*]}"
exit 1
fi

- name: Publish Tagged Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v3
with:
Expand All @@ -70,3 +92,45 @@ jobs:
CLOVERX64.efi.zip
Clover_r*.pkg
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }}

- name: Publish Alpha Rolling Release
if: (github.event_name == 'workflow_dispatch' && inputs.alpha_build == true) || (github.event_name == 'push' && github.ref == 'refs/heads/master')
uses: softprops/action-gh-release@v3
with:
tag_name: Clover-Build-Alpha
name: "Clover Build Alpha (${{ env.GIT_SHA }})"
body: |
Automated alpha build from commit `${{ env.GIT_SHA }}` on branch `${{ github.ref_name }}`.
This is a rolling pre-release and will be overwritten by future alpha builds.
files: |
*.7z
CloverV2*.zip
CLOVERX64.efi.zip
Clover_r*.pkg
generate_release_notes: false
prerelease: true
make_latest: false

- name: Remove Stale Alpha Release Assets
if: (github.event_name == 'workflow_dispatch' && inputs.alpha_build == true) || (github.event_name == 'push' && github.ref == 'refs/heads/master')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if ! gh release view Clover-Build-Alpha >/dev/null 2>&1; then
echo "Clover-Build-Alpha release does not exist yet; skipping asset cleanup."
exit 0
fi

shopt -s nullglob
current=(*.7z CloverV2*.zip CLOVERX64.efi.zip Clover_r*.pkg)
gh release view Clover-Build-Alpha --json assets --jq '.assets[].name' |
while IFS= read -r asset; do
keep=false
for f in "${current[@]}"; do
if [ "$f" = "$asset" ]; then keep=true; break; fi
done
if [ "$keep" = false ]; then
gh release delete-asset Clover-Build-Alpha "$asset" --yes
fi
done
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

# CloverBootloader
[![CI](https://github.com/CloverHackyColor/CloverBootloader/actions/workflows/main.yml/badge.svg)](https://github.com/CloverHackyColor/CloverBootloader/actions/workflows/main.yml) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://github.com/CloverHackyColor/CloverBootloader/blob/master/LICENSE)
[![CI](https://github.com/CloverHackyColor/CloverBootloader/actions/workflows/main.yml/badge.svg)](https://github.com/CloverHackyColor/CloverBootloader/actions/workflows/main.yml) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://github.com/CloverHackyColor/CloverBootloader/blob/master/LICENSE) [![Latest Release](https://img.shields.io/github/v/release/CloverHackyColor/CloverBootloader?style=flat&label=Latest%20Release)](https://github.com/CloverHackyColor/CloverBootloader/releases/latest)
[![Version](https://img.shields.io/github/v/tag/CloverHackyColor/CloverBootloader?filter=Clover-Build-Alpha*&style=flat&label=Version&cacheSeconds=60)](https://github.com/CloverHackyColor/CloverBootloader/releases)

<img width="200" alt="CloverLogo" src="Logo/Clover-Logo-Default-256x256@1x.png">

Expand Down
Loading