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
8 changes: 5 additions & 3 deletions .github/workflows/central-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: v${{ github.event.inputs.release_version }}
- uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
java-version: |
17
21
- name: Publish to Sonatype OSSRH
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/graalvm-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build Matrix
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
id: build-matrix
Expand All @@ -42,7 +42,7 @@ jobs:
DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Pre-Build Steps
uses: micronaut-projects/github-actions/graalvm/pre-build@master
id: pre-build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/graalvm-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Build Matrix
uses: micronaut-projects/github-actions/graalvm/build-matrix@master
id: build-matrix
Expand All @@ -42,7 +42,7 @@ jobs:
DEVELOCITY_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }}
DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Pre-Build Steps
uses: micronaut-projects/github-actions/graalvm/pre-build@master
id: pre-build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
df -h

- name: "📥 Checkout repository"
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: "🔧 Setup GraalVM CE"
uses: graalvm/[email protected].5
uses: graalvm/[email protected].6
with:
distribution: 'graalvm'
java-version: ${{ matrix.java }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ jobs:
if: github.repository != 'micronaut-projects/micronaut-project-template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
java-version: |
17
21
- name: Publish to Sonatype Snapshots
if: success()
env:
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
token: ${{ secrets.GH_TOKEN }}
- uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
java-version: |
17
21
- name: Set the current release version
id: release_version
run: echo "release_version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
Expand All @@ -45,22 +47,15 @@ jobs:
DEVELOCITY_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
run: |
echo $GPG_FILE | base64 -d > secring.gpg
# Publish both locally and to Sonatype.
# The artifacts stored locally will be used to generate the SLSA provenance.
./gradlew publishToMavenCentral --publishing-type=AUTOMATIC
# Read the current version from gradle.properties.
VERSION=$(./gradlew properties | grep 'version:' | awk '{print $2}')
# Read the project group from gradle.properties.
GROUP_PATH=$(./gradlew properties| grep "projectGroup" | awk '{print $2}' | sed 's/\./\//g')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "group=$GROUP_PATH" >> "$GITHUB_OUTPUT"
# Publish locally
./gradlew publishAllPublicationsToBuildRepository
# ZIP Artifacts
cd build/repo
zip -r ../../artifacts.zip io
cd ../..
export SONATYPE_BEARER=$(printf "%s:%s" "$SONATYPE_USERNAME" "$SONATYPE_PASSWORD" | base64 | tr -d '\n')
echo "Publishing via the Portal API"
# https://central.sonatype.org/publish/publish-portal-api/#uploading-a-deployment-bundle
curl -X POST https://central.sonatype.com/api/v1/publisher/upload -H "Authorization: Bearer $SONATYPE_BEARER" -F name="$GROUP_PATH $VERSION" -F publishingType="AUTOMATIC" -F [email protected]
- name: Generate subject
id: hash
run: |
Expand Down Expand Up @@ -122,7 +117,7 @@ jobs:
artifacts-sha256: ${{ steps.set-hash.outputs.artifacts-sha256 }}
steps:
- name: Download artifacts-sha256
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: artifacts-sha256
# The SLSA provenance generator expects the hash digest of artifacts to be passed as a job
Expand Down Expand Up @@ -153,9 +148,9 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Download artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: gradle-build-outputs
path: build/repo
Expand Down
Loading