-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Patrick Schwager
committed
Feb 7, 2025
1 parent
df5df15
commit 36d607b
Showing
6 changed files
with
139 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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
34 changes: 16 additions & 18 deletions
34
.github/workflows/gradle-publish.yml → .github/workflows/ci.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,43 @@ | ||
# SPDX-FileCopyrightText: 2024 Deutsche Telekom AG | ||
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Publish | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@v5 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/[email protected] | ||
|
||
publish: | ||
needs: verify | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@v5 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/[email protected] | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Publish to Maven Central | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_SUBKEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_SUBKEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} | ||
run: ./gradlew publishAllPublicationsToMavenCentralRepository | ||
- name: Generate and submit dependency graph | ||
if: github.ref == 'refs/heads/main' | ||
uses: gradle/actions/dependency-submission@v4 |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Release Milestone | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+-M[1-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+-RC[1-9]+' | ||
|
||
jobs: | ||
build-and-release-milestone: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
#packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@v5 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/[email protected] | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Publish to Maven Central | ||
env: | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_SUBKEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} | ||
run: ./gradlew publishAllPublicationsToMavenCentralRepository | ||
- name: "Create release info" | ||
uses: "actions/github-script@v7" | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
script: | | ||
try { | ||
const response = await github.rest.repos.createRelease({ | ||
draft: false, | ||
generate_release_notes: true, | ||
name: v${{ github.ref_name }}, | ||
owner: context.repo.owner, | ||
prerelease: true, | ||
repo: context.repo.repo, | ||
tag_name: ${{ github.ref_name }}, | ||
}); | ||
core.exportVariable('RELEASE_ID', response.data.id); | ||
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
#contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: REUSE Compliance Check | ||
uses: fsfe/reuse-action@v5 | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/[email protected] | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Publish to Maven Central | ||
env: | ||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_SUBKEY_ID }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }} | ||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }} | ||
run: ./gradlew publishAllPublicationsToMavenCentralRepository | ||
- name: "Create release info" | ||
uses: "actions/github-script@v7" | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
script: | | ||
try { | ||
const response = await github.rest.repos.createRelease({ | ||
draft: false, | ||
generate_release_notes: true, | ||
name: v${{ github.ref_name }}, | ||
owner: context.repo.owner, | ||
prerelease: false, | ||
repo: context.repo.repo, | ||
tag_name: ${{ github.ref_name }}, | ||
}); | ||
core.exportVariable('RELEASE_ID', response.data.id); | ||
core.exportVariable('RELEASE_UPLOAD_URL', response.data.upload_url); | ||
} catch (error) { | ||
core.setFailed(error.message); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
kotlin.code.style=official | ||
version=0.1.0-SNAPSHOT | ||
version=0.0.1-SNAPSHOT |