Skip to content

Commit

Permalink
Configure GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRocks committed May 16, 2021
1 parent 201f22a commit 3da259f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build

on: [push, pull_request]

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Configure JDK
uses: actions/setup-java@v1
with:
java-version: 8

- name: Test
run: ./gradlew build

publish:
runs-on: ubuntu-latest
if: contains(github.ref, '/tags/v')
needs:
- build

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Configure JDK
uses: actions/setup-java@v1
with:
java-version: 8

- name: Upload Artifacts
run: |
./gradlew publishMavenPublicationToSonatypeRepository \
-Ppablo.repository.maven.name=Sonatype \
-Ppablo.repository.maven.url=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
-Ppablo.repository.maven.username=${{ secrets.SONATYPE_USERNAME }} \
-Ppablo.repository.maven.password=${{ secrets.SONATYPE_PASSWORD }} \
-Ppablo.signing.keyId=${{ secrets.SIGNING_KEY_ID }} \
-Ppablo.signing.password=${{ secrets.SIGNING_PASSWORD }} \
-Ppablo.signing.secretKey='${{ secrets.SIGNING_SECRET_KEY }}'

0 comments on commit 3da259f

Please sign in to comment.