Release #28
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
| # GitHub@NDBlockConnect | BlockConnect@StarsailsClover | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'fabric/v*' | |
| - 'neoforge/v*' | |
| - 'forge/v*' | |
| - 'quilt/v*' | |
| - 'liteloader/v*' | |
| # Manual fallback: tag-push events have silently not fired on this repo | |
| # since the v26.0 line. Dispatch a run for a given tag: | |
| # gh workflow run release.yml --ref main -f tag=fabric/v26.9 | |
| workflow_dispatch: | |
| inputs: | |
| release_tag: | |
| description: 'Tag to release (e.g. fabric/v26.9)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Resolve tag (dispatch or push) | |
| id: resolve | |
| shell: pwsh | |
| run: | | |
| if ("${{ github.event_name }}" -eq "workflow_dispatch") { | |
| "tag=${{ inputs.release_tag }}" | Add-Content $env:GITHUB_OUTPUT | |
| } else { | |
| "tag=${{ github.ref_name }}" | Add-Content $env:GITHUB_OUTPUT | |
| } | |
| - name: Checkout AprismRefract at the release tag | |
| uses: actions/checkout@v4 | |
| with: | |
| path: AprismRefract | |
| ref: ${{ steps.resolve.outputs.tag }} | |
| - name: Checkout Aprism (sibling) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: AprismLab/Aprism | |
| path: Aprism | |
| - 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 Aprism jars (api + loader-core + manifest) | |
| working-directory: Aprism | |
| run: ./gradlew :aprism-api:jar :aprism-loader-core:jar :aprism-manifest:jar --console=plain | |
| - name: Build and test | |
| working-directory: AprismRefract | |
| run: ./gradlew build --console=plain | |
| - name: Package all .aep variants | |
| working-directory: AprismRefract | |
| run: ./gradlew packageAllAeps --console=plain | |
| - name: Assemble artifacts | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force dist | Out-Null | |
| Copy-Item "AprismRefract/build/aprism/*.aep" "dist/" | |
| Get-ChildItem dist/*.aep | ForEach-Object { | |
| (Get-FileHash -LiteralPath $_.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/*.aep | 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: | | |
| $ver = "${{ steps.resolve.outputs.tag }}" | |
| $aepName = (Get-ChildItem dist/*.aep | Select-Object -First 1).Name | |
| $loader = ($aepName -split '-Support')[0] | |
| npm install -g @cyclonedx/cdxgen | |
| Set-Location AprismRefract | |
| cdxgen -t java --project-name "AprismRefract-$loader-Support" --project-version $ver -o ../dist/AprismRefract-$loader-sbom.cdx.json | |
| - name: Delete existing release (if any) | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release delete "${{ steps.resolve.outputs.tag }}" --repo AprismLab/AprismRefract --yes 2>$null | |
| exit 0 | |
| - name: Create release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| $ver = "${{ steps.resolve.outputs.tag }}" | |
| $aepFiles = Get-ChildItem dist/*.aep | |
| $loader = ($aepFiles[0].Name -split '-Support')[0] | |
| $aepList = ($aepFiles | ForEach-Object { " - ``$($_.Name)``" }) -join "`n" | |
| $notes = @" | |
| AprismRefract $loader-Support $ver | |
| Loader-support extension (.aep) for the $loader loader, built against | |
| the Aprism core v26.x line. Contains MC-version-specific variants. | |
| **Contents** | |
| $aepList | |
| - ``checksums.txt``: SHA-256 of all artifacts | |
| - ``.sig`` / ``.bundle``: cosign keyless signatures (per artifact) | |
| - ``AprismRefract-$loader-sbom.cdx.json``: CycloneDX SBOM | |
| **Install** | |
| Place the appropriate ``.aep`` for your MC version in | |
| ``<instance>/aprism-extensions/`` and launch with Aprism Loader. | |
| See docs/version-matrix.md for the full compatibility matrix. | |
| **Verify** | |
| `````` | |
| certutil -hashfile <aep-file> SHA256 # compare with checksums.txt | |
| cosign verify-blob <aep-file> --bundle <aep-file>.bundle ` | |
| --certificate-identity-regexp https://github.com/AprismLab/AprismRefract ` | |
| --certificate-oidc-issuer https://token.actions.githubusercontent.com | |
| `````` | |
| "@ | |
| # Release channel per the versioning spec: Alpha tags publish as | |
| # Pre-Release; bare-number GA publishes as a full Release (and | |
| # becomes the repo's latest). | |
| $createArgs = @("release", "create", $ver, "dist/*", | |
| "--title", $ver, "--notes", $notes, | |
| "--repo", "AprismLab/AprismRefract") | |
| if ($ver -match "-Alpha") { | |
| $createArgs += "--prerelease" | |
| } else { | |
| $createArgs += "--latest" | |
| } | |
| gh @createArgs |