Compare commits

..

11 Commits

Author SHA1 Message Date
Shubham Rawat
3b7127df15 Revert "Moving from the travis.yml to github actions" 2022-02-16 15:19:34 +05:30
Shubham Rawat
352977eef5 Merge pull request #425 from Swagger2Markup/githubActions
Moving from the travis.yml to github actions
2022-02-16 15:14:28 +05:30
Shubham Rawat
743624ee77 Merge pull request #424 from ShubhamRwt/releaseProcess
Moving from Bintray to Sonatype and other additional changes
2022-02-16 15:14:12 +05:30
ShubhamRwt
5f910fd564 changes 2022-02-14 14:47:25 +05:30
ShubhamRwt
c665d1f5cd changes 2022-02-14 14:16:19 +05:30
ShubhamRwt
da23c929c0 Move from bintray to SonaType 2022-02-14 14:10:11 +05:30
ShubhamRwt
7141fc094b changes 2022-02-14 13:01:32 +05:30
ShubhamRwt
f6152f6c9b changes 2022-02-14 12:52:22 +05:30
ShubhamRwt
9f89c40280 changes 2022-02-14 12:38:53 +05:30
ShubhamRwt
f60999dd9f changes 2022-02-11 16:38:55 +05:30
ShubhamRwt
a45caa4d19 changes 2022-02-11 16:34:41 +05:30
4 changed files with 12 additions and 149 deletions

View File

@@ -1,82 +0,0 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
validation:
name: "Gradle wrapper validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: gradle/wrapper-validation-action@v1.0.4
build:
name: "Build and publish"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Cache SonarCloud packages
uses: actions/cache@v2.1.6
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
id: gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: "Comment build scan url"
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ ${{ github.workflow }} failed: ${{ steps.gradle.outputs.build-scan-url }}'
})
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
with:
files: '**/test-results/**/*.xml'
- name: Analyze with SonarCloud
continue-on-error: true
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
uses: eskatos/gradle-command-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
arguments: sonarqube -Psonar.organization=swagger2markup
dependencies-cache-enabled: true
configuration-cache-enabled: true
- name: Publish to Sonatype
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: eskatos/gradle-command-action@v1
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword : ${{ secrets.SONATYPE_PASSWORD }}
with:
arguments: publishToSonatype
dependencies-cache-enabled: true
configuration-cache-enabled: true

View File

@@ -1,10 +1,9 @@
plugins {
id "org.sonarqube" version "2.7"
id "com.jfrog.bintray" version "1.8.4"
id "me.champeau.gradle.jmh" version "0.4.8"
id 'org.asciidoctor.convert' version '1.6.0'
id "com.jfrog.artifactory" version "4.9.5"
id "org.ajoberstar.github-pages" version "1.7.2"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
apply plugin: 'idea'
apply from: "${rootDir}/libraries.gradle"
@@ -16,7 +15,6 @@ ext {
allprojects {
apply plugin: 'jacoco'
apply plugin: 'me.champeau.gradle.jmh'
apply plugin: 'com.jfrog.artifactory'
version = '2.0.0-SNAPSHOT'
group 'io.github.swagger2markup'
@@ -31,7 +29,7 @@ allprojects {
}
}
}
artifactoryPublish.skip = true // apply to all projects except the root
//artifactoryPublish.skip = true // apply to all projects except the root
ext {
coreProjects = subprojects.findAll {
@@ -43,13 +41,12 @@ configure(project.coreProjects) {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply from: "${rootDir}/publishing.gradle"
apply plugin: 'jacoco'
tasks.withType(JavaCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
sourceCompatibility = "11"
targetCompatibility = "11"
options.deprecation = true
options.encoding = 'UTF-8'
options.compilerArgs += ["-Xlint:unchecked", "-parameters"]
@@ -67,8 +64,15 @@ configure(project.coreProjects) {
}
}
nexusPublishing {
repositories {
sonatype()
}
}
sonarqube {
properties {
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectName", "swagger2markup"
property "sonar.projectKey", "swagger2markup_swagger2markup"
property "sonar.links.homepage", "https://github.com/Swagger2Markup/swagger2markup"
@@ -110,33 +114,6 @@ subprojects {
tasks.check.dependsOn tasks.jacocoTestReport
test {
dependsOn(subprojects.test) // required by cobertura to aggregate report
}
artifactory {
contextUrl = 'https://oss.jfrog.org'
resolve {
repository {
repoKey = 'libs-release'
maven = true
}
}
publish {
repository {
repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to
//when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
//~/.gradle/gradle.properties, otherwise to be set in the build server
username = project.hasProperty('bintrayUsername') ? project.bintrayUsername : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.bintrayApiKey : System.getenv('BINTRAY_KEY')
}
defaults {
publications('mavenJava')
}
}
if (System.properties['https.proxyHost']) {
clientConfig.proxy.host = System.properties['https.proxyHost']
clientConfig.proxy.port = System.properties['https.proxyPort'].toInteger()
}
}

View File

@@ -44,38 +44,6 @@ artifacts {
archives javadocJar
}
bintray {
user = project.hasProperty('bintrayUsername') ? project.property('bintrayUsername') : ''
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : ''
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
publications = ['mavenJava']
pkg {
repo = 'Maven'
name = "${projectArtifactId}"
userOrg = "${projectArtifactId}"
websiteUrl = "${projectUrl}"
issueTrackerUrl = issuesUrl
vcsUrl = scmUrl
desc = project.description
licenses = ['Apache-2.0']
version {
name = project.version
vcsTag = "v${project.version}"
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
//Optional. The passphrase for GPG signing'
passphrase = project.hasProperty('gpgPassphrase') ? project.property('gpgPassphrase') : ''
}
mavenCentralSync {
sync = true //Optional (true by default). Determines whether to sync the version to Maven Central.
user = project.hasProperty('ossUser') ? project.property('ossUser') : '' //OSS user token
password = project.hasProperty('ossPassword') ? project.property('ossPassword') : '' //OSS user password
}
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {

View File

@@ -1,7 +1,7 @@
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.ajoberstar.github-pages'
artifactoryPublish.skip=true
//artifactoryPublish.skip=true
sonarqube.skipProject=true
asciidoctor.dependsOn test