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
7 changes: 5 additions & 2 deletions .github/workflows/javalib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

steps:
- uses: actions/checkout@v1

- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- uses: actions/checkout@v1
- name: Dummy gradle.properties
shell: bash
run: |
Expand All @@ -38,7 +41,7 @@ jobs:
run: ./gradlew test
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Test output
path: /home/runner/work/ConditionalRestrictionParser/ConditionalRestrictionParser/build/reports/tests/test/
Expand Down
41 changes: 32 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
/*
*/
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.breadmoirai:github-release:2.5.2"
}
}

plugins {
id "ca.coglinc.javacc" version "2.4.0"
id "org.sonarqube" version "4.0.0.2929"
id "org.sonarqube" version "6.2.0.5505"
}

// Apply the java plugin to add support for Java
Expand All @@ -12,9 +22,9 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "jacoco"
apply plugin: "com.github.breadmoirai.github-release"


version = '0.3.4'
version = '0.3.5'
sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand Down Expand Up @@ -112,6 +122,7 @@ test {
ext {
repoUrl = 'https://github.com/simonpoole/ConditionalRestrictionParser.git'
spdxId = 'MIT'
githubToken = System.getenv('GITHUB_TOKEN')
}

publishing {
Expand Down Expand Up @@ -144,12 +155,9 @@ publishing {
repositories {
maven {
name = 'sonatype'
credentials {
username System.getenv('SONATYPE_USER')
password System.getenv('SONATYPE_PASSWORD')
}
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
credentials(PasswordCredentials)
def releasesRepoUrl = "https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://ossrh-staging-api.central.sonatype.com/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
Expand All @@ -161,6 +169,21 @@ signing {
sign publishing.publications.Release
}

githubRelease {
token project.ext.githubToken == null ? "" : project.ext.githubToken
repo = "ConditionalRestrictionParser"
owner = "simonpoole"
tagName = project.version
releaseName = project.version
targetCommitish = "master"
generateReleaseNotes = true
overwrite = true
}

afterEvaluate {
publishReleasePublicationToSonatypeRepository.dependsOn tasks.githubRelease
}

// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading