forked from GeneralElectric/snowizard-discovery
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,20 @@ | ||
--- | ||
name: Build | ||
on: [push, pull_request] | ||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- release/* | ||
pull_request: | ||
jobs: | ||
yamllint: | ||
uses: dropwizard/workflows/.github/workflows/yamllint.yml@main | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java_version: ['8', '11', '17'] | ||
os: ['ubuntu-latest'] | ||
env: | ||
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ matrix.java_version }} | ||
cache: 'maven' | ||
- name: Cache SonarCloud packages | ||
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }} | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Build | ||
run: ./mvnw -B -V -ntp install | ||
- name: Analyze with SonarCloud | ||
if: ${{ env.SONAR_TOKEN != null && env.SONAR_TOKEN != '' && matrix.java_version == '11' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./mvnw -B -V -ntp org.sonarsource.scanner.maven:sonar-maven-plugin:sonar | ||
java-version: ['11', '17', '21'] | ||
uses: dropwizard/workflows/.github/workflows/maven.yml@main | ||
secrets: inherit | ||
with: | ||
java-version: ${{ matrix.java-version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,11 @@ | ||
--- | ||
name: Release | ||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
- v* | ||
jobs: | ||
release: | ||
runs-on: 'ubuntu-latest' | ||
env: | ||
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
cache: 'maven' | ||
server-id: sonatype-nexus-staging | ||
server-username: CI_DEPLOY_USERNAME | ||
server-password: CI_DEPLOY_PASSWORD | ||
gpg-passphrase: GPG_PASSPHRASE | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
- uses: actions/[email protected] | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build and Deploy | ||
run: ./mvnw -B -V -ntp -DperformRelease=true deploy | ||
env: | ||
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | ||
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
uses: dropwizard/workflows/.github/workflows/release.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
# yamllint disable rule:comments rule:line-length | ||
name: Trigger Release | ||
# yamllint disable-line rule:truthy | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseVersion: | ||
description: Version of the next release | ||
required: true | ||
type: string | ||
developmentVersion: | ||
description: Version of the next development cycle (must end in "-SNAPSHOT") | ||
required: true | ||
type: string | ||
jobs: | ||
release: | ||
uses: dropwizard/workflows/.github/workflows/trigger-release.yml@main | ||
secrets: inherit | ||
with: | ||
releaseVersion: ${{ inputs.releaseVersion }} | ||
developmentVersion: ${{ inputs.developmentVersion }} |