Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into pp/#1012-chpmodelspec-and-cylindri…
Browse files Browse the repository at this point in the history
…calthermalstoragespec-also-need-adaptions-for-storage-without-storagevolumelvlmin
  • Loading branch information
danielfeismann committed Dec 10, 2024
2 parents 5b35371 + caeaad0 commit 0bb6620
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,21 @@ jobs:
exit 1
fi
#Deployment
- name: Deploy
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev'
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVENCENTRAL_SIGNINGPASS }}
ORG_GRADLE_PROJECT_user: ${{ secrets.MAVENCENTRAL_USER }}
ORG_GRADLE_PROJECT_password: ${{ secrets.MAVENCENTRAL_PASS }}
run: |
./gradlew publish\
-Puser=${{ secrets.MAVENCENTRAL_USER }} \
-Ppassword=${{ secrets.MAVENCENTRAL_PASS }} \
-Psigning.keyId=${{ secrets.MAVENCENTRAL_SIGNINGKEYID }} \
-Psigning.password=${{ secrets.MAVENCENTRAL_SIGNINGPASS }} \
-Psigning.secretKeyRingFile=${{ secrets.MAVENCENTRAL_SIGNINGKEY }}
if [ "${GITHUB_REF}" == "refs/heads/main" ]; then
currentVersion=$(./gradlew -q currentVersion)
else
currentVersion=$(./gradlew -q devVersion)
fi
echo "currentVersion=$currentVersion"
./gradlew publish -PdeployVersion=$currentVersion
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added weatherData HowTo for Copernicus ERA5 data [#967](https://github.com/ie3-institute/simona/issues/967)
- Add some quote to 'printGoodbye' [#997](https://github.com/ie3-institute/simona/issues/997)
- Add unapply method for ThermalHouseResults [#934](https://github.com/ie3-institute/simona/issues/934)
- Implemented GitHub Actions Pipeline [#939](https://github.com/ie3-institute/simona/issues/939)
- Added `ApparentPower` to differentiate between different power types [#794](https://github.com/ie3-institute/simona/issues/794)
- Update/enhance config documentation [#1013](https://github.com/ie3-institute/simona/issues/1013)
- Create `CITATION.cff` [#1035](https://github.com/ie3-institute/simona/issues/1035)
Expand Down Expand Up @@ -149,6 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix initialisation freezing on empty primary data [#981](https://github.com/ie3-institute/simona/issues/981)
- Shallow fetch in CI [#1041](https://github.com/ie3-institute/simona/issues/1041)
- Correct wrong use of term "wall clock time" [#727](https://github.com/ie3-institute/simona/issues/727)
- Fixed Deployment of `simona` to `Maven Central` in new GHA Pipeline [#1029](https://github.com/ie3-institute/simona/issues/1029)

## [3.0.0] - 2023-08-07

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ apply from: scriptsLocation + 'scoverage.gradle' // scoverage scala code coverag
apply from: scriptsLocation + 'deploy.gradle'
apply from: scriptsLocation + 'semVer.gradle'
apply from: scriptsLocation + 'mavenCentralPublish.gradle'
apply from: scriptsLocation + 'branchName.gradle'
apply from: scriptsLocation + 'branchName.gradle' // checks naming scheme of branches

configurations {
scalaCompilerPlugin
Expand Down
2 changes: 1 addition & 1 deletion gradle/scripts/branchName.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks.register('checkBranchName') {
def isValid = patterns.any { pattern -> branchName ==~ pattern }

if (!isValid) {
throw new GradleException("Error: Check Branch name format (e.g., ps/#1337-FeatureName).")
throw new GradleException("Error: Check Branch name format (e.g., ps/#1337-FeatureName). Current branch name is $branchName.")
}

println "Branch name is $branchName"
Expand Down
15 changes: 7 additions & 8 deletions gradle/scripts/mavenCentralPublish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}


if (project.hasProperty('user') && project.hasProperty('password') && project.hasProperty('deployVersion')) {

// snapshot version differs from normal version
String versionString = project.getProperty('deployVersion')

signing {
required { !versionString.endsWith('SNAPSHOT') }
if (required)
sign(publishing.publications)
}

publishing {
publications {
Expand Down Expand Up @@ -87,9 +81,15 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
}
}
}
signing {
useInMemoryPgpKeys(
findProperty('signingKey'),
findProperty('signingPassword')
)
sign publishing.publications.mavenJava
}
}


model {
tasks.generatePomFileForMavenJavaPublication {
destination = file("$buildDir/generated-pom.xml")
Expand All @@ -98,7 +98,6 @@ if (project.hasProperty('user') && project.hasProperty('password') && project.ha
}

def removeTestDependenciesFromPom(pom) {

pom.withXml {
def root = asNode()
// eliminate test-scoped dependencies (no need in maven central POMs)
Expand Down
8 changes: 4 additions & 4 deletions gradle/scripts/semVer.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// tasks for semantic versioning using semver-gradle https://github.com/ethauvin/semver-gradle

task currentVersion {
doFirst{
tasks.register('currentVersion') {
doFirst {
println semver.semver
}
}

task devVersion {
doFirst{
tasks.register('devVersion') {
doFirst {
println "${semver.major}.${semver.minor}-SNAPSHOT"
}
}

0 comments on commit 0bb6620

Please sign in to comment.