Skip to content

Commit

Permalink
Adapt pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Schwager committed Feb 7, 2025
1 parent df5df15 commit d9c4dc6
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024 Deutsche Telekom AG
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
#
# SPDX-License-Identifier: Apache-2.0

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
#
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
push:
branches:
- '**'

jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
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
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_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
50 changes: 0 additions & 50 deletions .github/workflows/gradle.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/release-milestone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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"
env:
GH_TOKEN: ${{ github.token }}
run: gh release create 'v${{ github.ref_name }}' --generate-notes --prerelease
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
# SPDX-FileCopyrightText: 2024 Deutsche Telekom AG
# SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
#
# SPDX-License-Identifier: Apache-2.0

name: Publish
name: Release

on:
push:
branches: [ main ]
tags:
- '[0-9]+.[0-9]+.[0-9]+'

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-release:
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
Expand All @@ -43,3 +38,7 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository
- name: "Create release info"
env:
GH_TOKEN: ${{ github.token }}
run: gh release create 'v${{ github.ref_name }}' --generate-notes --latest
2 changes: 1 addition & 1 deletion gradle.properties
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

0 comments on commit d9c4dc6

Please sign in to comment.