-
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.
- Loading branch information
1 parent
f9e213e
commit e78bfe9
Showing
1 changed file
with
15 additions
and
58 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,67 +1,24 @@ | ||
name: Deploy WIth KMM Bridge Github Workflow | ||
|
||
|
||
on: [push, pull_request] # or any other event | ||
|
||
# Jobs : https://github.com/touchlab/KMMBridgeGithubWorkflow/blob/main/.github/workflows/faktorybuildautoversion.yml | ||
|
||
|
||
name: Deploy WIth KMM Bridge Github Workflow | ||
|
||
permissions: write-all | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# You can adjust the trigger as needed. This is just an example that will run the workflow on pushes to the main branch. | ||
# Remove the workflow_call section if you're not planning to call this workflow externally anymore. | ||
|
||
jobs: | ||
kmmbridgepublish: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-12] # You can expand this matrix if needed | ||
steps: | ||
- name: Checkout the repo with tags | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Read versionBaseProperty from gradle.properties | ||
id: read_property | ||
uses: touchlab/[email protected] | ||
with: | ||
file: ./gradle.properties | ||
property: versionBaseProperty # Adjust this to your actual property name in gradle.properties | ||
|
||
- name: Print versionBasePropertyValue | ||
run: echo "Version Base Property Value ${{ steps.read_property.outputs.propVal }}" | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '11' # Use matrix or input if you want to support multiple versions | ||
|
||
- name: Cache Gradle and Kotlin Native dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.konan | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Run Publish Task | ||
run: ./gradlew publish -PversionBase=${{ steps.read_property.outputs.propVal }} | ||
# Customize the gradle command according to your project's needs. | ||
env: | ||
JAVA_OPTS: -Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m | ||
# Add other environment variables here | ||
call-external-workflow: | ||
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildautoversion.yml@main | ||
with: | ||
# Provide inputs here if the external workflow requires them | ||
versionBaseProperty: 'versionBaseProperty' # Example version | ||
jvmVersion: '17' # Optional | ||
netrcMachine: 'maven.pkg.github.com' | ||
module: 'JanusSdpClient' | ||
retainBuildBranch: true # Optional | ||
secrets: | ||
# Provide secrets here if the external workflow requires them | ||
netrcUsername: ${{ secrets.NETRC_USERNAME }} | ||
netrcPassword: ${{ secrets.NETRC_PASSWORD }} | ||
|
||
# Add any other steps required for your publishing logic here. |