Skip to content
This repository was archived by the owner on Jun 18, 2026. It is now read-only.

v2.60.0 — Link Prediction, Chromatic Polynomial Tests & Steiner Tree Performance #61

v2.60.0 — Link Prediction, Chromatic Polynomial Tests & Steiner Tree Performance

v2.60.0 — Link Prediction, Chromatic Polynomial Tests & Steiner Tree Performance #61

Workflow file for this run

name: Publish to GitHub Packages
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 1.1.0)'
required: false
type: string
permissions:
contents: write
packages: write
attestations: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
server-id: github
settings-path: ${{ github.workspace }}
- name: Install local vendored JARs
run: |
mvn initialize -P install-local-deps -B
- name: Set version from release tag
if: github.event_name == 'release'
run: |
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
mvn versions:set -DnewVersion="$VERSION" -B
- name: Set version from input
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version != ''
run: |
mvn versions:set -DnewVersion="${{ github.event.inputs.version }}" -B
- name: Build package (with sources and javadoc)
run: mvn package source:jar javadoc:jar -B -DskipTests
- name: Publish to GitHub Packages
run: mvn deploy -B -DskipTests -s ${{ github.workspace }}/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JAR artifacts
uses: actions/upload-artifact@v7
with:
name: graphvisual-jars
path: |
target/*.jar
!target/original-*.jar
retention-days: 90
- name: Generate checksums
if: github.event_name == 'release'
run: |
cd target
for jar in *.jar; do
[ -f "$jar" ] || continue
sha256sum "$jar" > "$jar.sha256"
done
- name: Attach JARs to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ github.event.release.tag_name }}"
# Upload fat JAR
FAT_JAR=$(ls target/*-all.jar 2>/dev/null | head -1)
[ -n "$FAT_JAR" ] && gh release upload "$TAG" "$FAT_JAR" --clobber
# Upload slim JAR
SLIM_JAR=$(ls target/graphvisual-*.jar 2>/dev/null | grep -v all | grep -v sources | grep -v javadoc | grep -v original | head -1)
[ -n "$SLIM_JAR" ] && gh release upload "$TAG" "$SLIM_JAR" --clobber
# Upload sources JAR
SRC_JAR=$(ls target/*-sources.jar 2>/dev/null | head -1)
[ -n "$SRC_JAR" ] && gh release upload "$TAG" "$SRC_JAR" --clobber
# Upload javadoc JAR
DOC_JAR=$(ls target/*-javadoc.jar 2>/dev/null | head -1)
[ -n "$DOC_JAR" ] && gh release upload "$TAG" "$DOC_JAR" --clobber
# Upload checksums
for checksum in target/*.sha256; do
[ -f "$checksum" ] && gh release upload "$TAG" "$checksum" --clobber
done
- name: Generate SBOM (CycloneDX)
run: mvn org.cyclonedx:cyclonedx-maven-plugin:2.9.1:makeAggregateBom -B
- name: Upload SBOM
uses: actions/upload-artifact@v7
with:
name: sbom
path: target/bom.json
retention-days: 90
- name: Attach SBOM to release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${{ github.event.release.tag_name }}"
[ -f target/bom.json ] && gh release upload "$TAG" target/bom.json#graphvisual-sbom.json --clobber
- name: Attest build provenance
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v4
with:
subject-path: target/graphvisual-*.jar