-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Upgrade github actions and use standard gradle actions
- Loading branch information
Showing
3 changed files
with
89 additions
and
91 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,47 +1,47 @@ | ||
name: build-main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run tests | ||
run: ./gradlew check | ||
|
||
- name: Bundle the build report | ||
if: failure() | ||
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | ||
|
||
- name: Upload the build report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: deploy to sonatype snapshots | ||
run: ./gradlew publish | ||
env: | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
|
||
- name: Run tests | ||
run: ./gradlew check | ||
|
||
- name: Bundle the build report | ||
if: failure() | ||
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | ||
- name: Upload the build report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
|
||
- name: deploy to sonatype snapshots | ||
run: ./gradlew publish | ||
env: | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} |
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,31 +1,30 @@ | ||
name: build-pr | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
|
||
- name: Run tests | ||
run: ./gradlew check | ||
- name: Run tests | ||
run: ./gradlew check | ||
|
||
- name: Bundle the build report | ||
if: failure() | ||
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | ||
- name: Bundle the build report | ||
if: failure() | ||
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | ||
|
||
- name: Upload the build report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: error-report | ||
path: build-reports.zip | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
- name: Upload the build report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: error-report | ||
path: build-reports.zip |
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,32 +1,31 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The release version (e.g., '1.9.0')." | ||
required: true | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The release version (e.g., '1.9.0')." | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
|
||
- name: publish release | ||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.version }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
- name: create release | ||
run: gh release create "v${RELEASE_VERSION}" --generate-notes | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.version }} | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
env: | ||
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" | ||
- name: publish release | ||
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.version }} | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} | ||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | ||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
- name: create release | ||
run: gh release create "v${RELEASE_VERSION}" --generate-notes | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.version }} | ||
GH_TOKEN: ${{ github.token }} |