feat(v26.2-Alpha.6): embed AprismateAgent as image lib/aprismate.jar #16
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*.*.*-Alpha.*' | |
| - 'v*.*.*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version (e.g., v26.0-Alpha.1)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate-release: | |
| name: Validate Release Requirements | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version from tag or input | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Releasing version: $VERSION" | |
| - name: Verify tag is signed | |
| if: github.event_name == 'push' | |
| run: | | |
| git tag -v ${{ steps.version.outputs.version }} || { | |
| echo "Error: Tag is not signed" | |
| exit 1 | |
| } | |
| - name: Verify version follows pattern | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+(-Alpha\.[0-9])?$ ]]; then | |
| echo "Error: Version $VERSION does not match pattern v<MAJOR>.<MINOR>[-Alpha.<N>]" | |
| exit 1 | |
| fi | |
| echo "Version format is valid" | |
| build-release: | |
| name: Build Release Artifacts - ${{ matrix.os }} - Java ${{ matrix.java }} | |
| runs-on: ${{ matrix.os }} | |
| needs: validate-release | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| java: [25, 21, 17] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Extract version | |
| id: version | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build release artifacts | |
| run: ./gradlew build -Pversion=${{ steps.version.outputs.version }} --no-daemon --stacktrace | |
| - name: Run full test suite | |
| run: ./gradlew test --no-daemon --stacktrace | |
| - name: Package JDK distribution (placeholder) | |
| shell: bash | |
| run: | | |
| mkdir -p dist/aprismjdk-${{ steps.version.outputs.version }}-java${{ matrix.java }}-${{ runner.os }} | |
| echo "JDK packaging will be implemented in v26.0-Alpha.5+" > dist/aprismjdk-${{ steps.version.outputs.version }}-java${{ matrix.java }}-${{ runner.os }}/README.txt | |
| - name: Package JRE distribution (placeholder) | |
| shell: bash | |
| run: | | |
| mkdir -p dist/aprismjre-${{ steps.version.outputs.version }}-java${{ matrix.java }}-${{ runner.os }} | |
| echo "JRE packaging will be implemented in v26.0-Alpha.5+" > dist/aprismjre-${{ steps.version.outputs.version }}-java${{ matrix.java }}-${{ runner.os }}/README.txt | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aprismate-${{ matrix.os }}-java${{ matrix.java }} | |
| path: | | |
| aprismate-api/build/libs/*.jar | |
| aprismate-agent/build/libs/*.jar | |
| dist/** | |
| retention-days: 90 | |
| create-release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: build-release | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Extract version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| # Determine if this is a pre-release | |
| if [[ "$VERSION" =~ -Alpha\. ]]; then | |
| echo "prerelease=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "prerelease=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Generate release notes | |
| id: notes | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| if [[ "$VERSION" =~ -Alpha\.1$ ]]; then | |
| NOTES="Initial alpha release for ${VERSION%%.*} line. See [ROADMAP.md](docs/ROADMAP.md) for development plan." | |
| elif [[ "$VERSION" =~ -Alpha\. ]]; then | |
| NOTES="Alpha release ${VERSION}. See commit history for changes since previous alpha." | |
| else | |
| NOTES="Stable release ${VERSION}. See [CHANGELOG.md](CHANGELOG.md) for full release notes." | |
| fi | |
| echo "notes<<EOF" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version.outputs.version }} | |
| name: AprismJDK ${{ steps.version.outputs.version }} | |
| body: ${{ steps.notes.outputs.notes }} | |
| draft: false | |
| prerelease: ${{ steps.version.outputs.prerelease }} | |
| files: | | |
| artifacts/**/*.jar | |
| fail_on_unmatched_files: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| verify-release: | |
| name: Post-Release Verification | |
| runs-on: ubuntu-latest | |
| needs: create-release | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 25 | |
| - name: Extract version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| VERSION="${{ inputs.version }}" | |
| else | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| fi | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Verify release exists | |
| run: | | |
| gh release view ${{ steps.version.outputs.version }} || { | |
| echo "Error: Release not found" | |
| exit 1 | |
| } | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify artifacts are downloadable | |
| run: | | |
| gh release download ${{ steps.version.outputs.version }} --dir verification || { | |
| echo "Warning: Could not download artifacts" | |
| } | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |