-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from middleware-labs/init-sdk
🎨 Added build workflow & refactor publish process
- Loading branch information
Showing
4 changed files
with
35 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build SDK | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Java 17 for running Gradle | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: Grant Permission to Execute Gradle | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build |
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,9 +1,10 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
versionName: | ||
description: 'Version Name' | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
|
@@ -12,7 +13,7 @@ jobs: | |
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 11 for running Gradle | ||
- name: Set up Java 17 for running Gradle | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
|
@@ -31,9 +32,9 @@ jobs: | |
echo "Publishing library🚀" | ||
./gradlew publish --no-daemon --no-parallel | ||
echo "Published✅" | ||
echo "Releasing repository...🚀" | ||
./gradlew closeAndReleaseRepository --repository iogithubmiddleware-labs-1042 | ||
./gradlew closeAndReleaseRepository | ||
echo "Released✅" | ||
env: | ||
ORG_GRADLE_PROJECT_VERSION_NAME: ${{ github.event.inputs.versionName }} | ||
|
@@ -55,9 +56,9 @@ jobs: | |
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GHCR_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.versionName }} | ||
release_name: ${{ github.event.inputs.versionName }} | ||
draft: true | ||
draft: false | ||
prerelease: false |
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
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,3 @@ | ||
RELEASE_SIGNING_ENABLED=true | ||
SONATYPE_HOST=S01 | ||
SONATYPE_AUTOMATIC_RELEASE=true |