Skip to content

Commit

Permalink
github actions - push to maven
Browse files Browse the repository at this point in the history
  • Loading branch information
axshani committed Dec 26, 2023
1 parent 813957f commit e8aa115
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI
on:
push:
pull_request:
branches:
- master

jobs:
unit-java-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew check
env:
UNIT_API_URL: ${{ secrets.UNIT_API_URL }}
UNIT_TOKEN: ${{ secrets.UNIT_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/publish-maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to Maven
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit e8aa115

Please sign in to comment.