Skip to content

Commit

Permalink
- Update GHA: build
Browse files Browse the repository at this point in the history
  • Loading branch information
zero88 committed Feb 20, 2021
1 parent bc10b0e commit 38c3605
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ on:

env:
ENABLE_TEST: true
ENABLE_GH_MAVEN: true
ENABLE_GH_MAVEN: false
ENABLE_GRADLE_PLUGIN: false
ENABLE_SONAR: true

jobs:
Expand Down Expand Up @@ -95,8 +96,21 @@ jobs:
-PsemanticVersion=${{ needs.context.outputs.semanticVersion }} \
-PbuildBy="GitHub Action" -PbuildHash=${{ needs.context.outputs.commitId }}
- name: Publish Sonatype OSSRH
if: needs.context.outputs.shouldPublish == 'true'
run: |
args=( -Pversion=${{ needs.context.outputs.version }} \
-PsemanticVersion=${{ needs.context.outputs.semanticVersion }} \
-Psigning.gnupg.homeDir=/home/runner/.gnupg \
-Psigning.gnupg.keyName=${{ steps.import_gpg.outputs.keyid }} \
-Psigning.gnupg.passphrase=${{ secrets.OSS_GPG_PASSPHARSE }} \
-Pnexus.username=${{ secrets.OSS_NEXUS_USER }} \
-Pnexus.password=${{ secrets.OSS_NEXUS_TOKEN }} )
[[ "${{ needs.context.outputs.isRelease }}" == 'true' ]] && args+=( -Prelease )
./gradlew publish "${args[@]}"
- name: Publish Gradle plugin
if: needs.context.outputs.isRelease == 'true'
if: needs.context.outputs.isRelease == 'true' && env.ENABLE_GRADLE_PLUGIN == 'true'
run: |
./gradlew publishPlugins \
-Pgradle.publish.key=${{ secrets.OSS_GRADLE_KEY }} \
Expand All @@ -116,19 +130,6 @@ jobs:
[[ "${{ needs.context.outputs.isRelease }}" == 'true' ]] && args+=( -Prelease )
./gradlew publish "${args[@]}"
- name: Publish Sonatype OSSRH
if: needs.context.outputs.shouldPublish == 'true'
run: |
args=( -Pversion=${{ needs.context.outputs.version }} \
-PsemanticVersion=${{ needs.context.outputs.semanticVersion }} \
-Psigning.gnupg.homeDir=/home/runner/.gnupg \
-Psigning.gnupg.keyName=${{ steps.import_gpg.outputs.keyid }} \
-Psigning.gnupg.passphrase=${{ secrets.OSS_GPG_PASSPHARSE }} \
-Pnexus.username=${{ secrets.OSS_NEXUS_USER }} \
-Pnexus.password=${{ secrets.OSS_NEXUS_TOKEN }} )
[[ "${{ needs.context.outputs.isRelease }}" == 'true' ]] && args+=( -Prelease )
./gradlew publish "${args[@]}"
analysis:
runs-on: ubuntu-latest
needs: context
Expand Down

0 comments on commit 38c3605

Please sign in to comment.