feat(eventbus): v26.3-Alpha.6 - dispatch priority for Forge/NeoForge … #40
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build and test | |
| run: ./gradlew build --console=plain | |
| - name: Assemble fat agent jar | |
| run: ./gradlew :aprism-loader-core:shadowJar --console=plain | |
| - name: Assemble artifacts | |
| shell: pwsh | |
| run: | | |
| $ver = "${{ github.ref_name }}" | |
| New-Item -ItemType Directory -Force dist | Out-Null | |
| Copy-Item "aprism-loader-core/build/libs/Aprism-$ver-JE-26.2.jar" "dist/" | |
| Get-ChildItem dist | ForEach-Object { | |
| (Get-FileHash $_.FullName -Algorithm SHA256).Hash.ToLower() + " " + $_.Name | | |
| Add-Content dist/checksums.txt | |
| } | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@v3 | |
| - name: Sign artifacts (keyless) | |
| shell: pwsh | |
| run: | | |
| Get-ChildItem dist/Aprism-*.jar | ForEach-Object { | |
| cosign sign-blob --yes ` | |
| --bundle "dist/$($_.Name).bundle" ` | |
| --output-signature "dist/$($_.Name).sig" $_.FullName | |
| } | |
| - name: Setup Node for cdxgen | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Generate SBOM (CycloneDX) | |
| shell: pwsh | |
| run: | | |
| npm install -g @cyclonedx/cdxgen | |
| cdxgen -t java --project-name Aprism --project-version "${{ github.ref_name }}" -o dist/Aprism-sbom.cdx.json | |
| - name: Delete existing release (if any) | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release delete "${{ github.ref_name }}" --yes 2>$null | |
| exit 0 | |
| - name: Create Release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| $ver = "${{ github.ref_name }}" | |
| # Bare version (no -Alpha suffix) = minor official = full Release. | |
| # Anything with -Alpha = Pre-Release. Build the command via branches so | |
| # an empty pre-release flag is never passed as an (empty) file argument. | |
| $isOfficial = -not ($ver -match "-Alpha") | |
| if ($isOfficial) { $kind = "Release" } else { $kind = "Pre-Release" } | |
| # Enriched release notes: if docs/release-notes/<version>.md exists it | |
| # is used verbatim (per-version changelog, highlights, verification, | |
| # known issues). Otherwise fall back to the generic template below. | |
| $notesFile = "docs/release-notes/$ver.md" | |
| if (Test-Path $notesFile) { | |
| $notes = Get-Content $notesFile -Raw | |
| } else { | |
| $notes = @" | |
| Aprism Loader $ver ($kind) | |
| Build of the 2026 major line. Targets Minecraft Java Edition 26.2. | |
| **Contents** | |
| - ``Aprism-$ver-JE-26.2.jar``: the self-contained javaagent (fat jar, dependencies relocated) | |
| - ``checksums.txt``: SHA-256 of the artifact | |
| - ``.sig`` / ``.bundle``: cosign keyless signatures (verify with ``cosign verify-blob``) | |
| **Quick start** | |
| `````` | |
| java -javaagent:Aprism-$ver-JE-26.2.jar=aprismVersion=$ver;mcEdit=JE;mcVersion=26.2;gameRoot=<path-to-game-dir> ... | |
| `````` | |
| Place ``.aje`` mods in ``<game-dir>/mods/``. See docs/zh/08-开发者指南.md. | |
| "@ | |
| } | |
| if ($isOfficial) { | |
| gh release create $ver dist/* --title $ver --notes $notes | |
| } else { | |
| gh release create $ver dist/* --prerelease --title $ver --notes $notes | |
| } |