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
18 changes: 18 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file determines how the auto-generated Release Notes in GitHub releases are structured.

changelog:
exclude:
labels:
- no-changelog
authors:
- dependabot[bot]
categories:
- title: Bugfixes
labels:
- bug
- title: New Features & Improvements
labels:
- "*"
- title: Documentation
labels:
- documentation
77 changes: 77 additions & 0 deletions .github/workflows/release-runtime-metamodel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create Runtime Metamodel Release
on:
workflow_dispatch:
inputs:
metamodel_version:
description: 'Version string that is used for publishing (e.g. "1.0.0", NOT "v1.0.0"). Appending -SNAPSHOT will create a snapshot release.'
required: true
type: string


env:
METAMODEL_VERSION: ${{ github.event.inputs.metamodel_version || inputs.metamodel_version }}

jobs:
Prepare-Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# create tag on the current branch using GitHub's own API
- name: Create tag on current branch (main)
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ env.METAMODEL_VERSION }}',
sha: context.sha
})

# create merge commit main -> releases encoding the version in the commit message
- name: Merge main -> releases
uses: everlytic/branch-merge@1.1.4
with:
github_token: ${{ github.token }}
source_ref: ${{ github.ref }}
target_branch: 'releases'
commit_message_template: 'Merge commit for release of version v${{ env.METAMODEL_VERSION }}'

# Trigger EF Jenkins. This job waits for Jenkins to complete the publishing, which may take a long time, because every
# module is signed individually, and parallelism is not available. Hence, the increased timeout of 3600 seconds.
# There is no way to cancel the process on Jenkins from withing GitHub.
- name: Trigger Release on EF Jenkins
uses: toptal/jenkins-job-trigger-action@master
with:
jenkins_url: "https://ci.eclipse.org/dataspaceconnector/"
jenkins_user: ${{ secrets.EF_JENKINS_USER }}
jenkins_token: ${{ secrets.EF_JENKINS_TOKEN }}
job_name: "Runtime-Metamodel-Autobuild-Release"
job_params: |
{
"VERSION": "${{ env.METAMODEL_VERSION }}"
}
job_timeout: "3600" # Default 30 sec. (optional)
outputs:
metamodel-version: ${{ env.METAMODEL_VERSION }}

Github-Release:
# cannot use the workflow-level env yet as it does not yet exist, must take output from previous job
if: ${{ !endsWith( needs.Prepare-Release.outputs.metamodel-version, '-SNAPSHOT') }}
needs:
- Prepare-Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
tag: "v${{ env.METAMODEL_VERSION }}"
token: ${{ secrets.GITHUB_TOKEN }}
removeArtifacts: true
30 changes: 20 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ plugins {
id("com.gradle.plugin-publish") version "1.0.0" apply false
}

val groupId: String by project;
val projectVersion: String by project;
var deployUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
val groupId: String by project
val defaultVersion: String by project
val jupiterVersion: String by project
val assertj: String by project
val mockitoVersion: String by project

// cannot do snapshots for gradle plugins
//if (projectVersion.contains("SNAPSHOT")) {
// deployUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
//}

var actualVersion: String = (project.findProperty("version") ?: defaultVersion) as String
if (actualVersion == "unspecified") {
actualVersion = defaultVersion
}

subprojects {
apply(plugin = "checkstyle")
version = projectVersion
version = actualVersion
group = groupId

// for all gradle plugins:
Expand All @@ -34,8 +37,13 @@ subprojects {
pluginManager.withPlugin("java-library") {
apply(plugin = "maven-publish")
if (!project.hasProperty("skip.signing")) {

apply(plugin = "signing")

//set the deploy-url only for java libraries
val deployUrl = if (actualVersion.contains("SNAPSHOT"))
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
else
"https://oss.sonatype.org/content/repositories/snapshots/"
publishing {
repositories {
maven {
Expand Down Expand Up @@ -63,8 +71,10 @@ subprojects {
tasks.withType(JavaCompile::class.java) {
// making sure the code does not use any APIs from a more recent version.
// Ref: https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
options.release.set(javaVersion.toInt())
options.release.set(javaVersion)
}
withJavadocJar()
withSourcesJar()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
assertj=3.23.1
jupiterVersion=5.9.0
groupId=org.eclipse.dataspaceconnector
projectVersion=0.0.1
defaultVersion=0.0.1-SNAPSHOT
jacksonVersion=2.13.3
jetBrainsAnnotationsVersion=15.0
1 change: 1 addition & 0 deletions runtime-metamodel/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
`java-library`
`maven-publish`
}

val jupiterVersion: String by project
Expand Down