-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Noor Dawod <[email protected]> Co-authored-by: Noor Dawod <[email protected]> Co-authored-by: Ståle Storø Hauknes <[email protected]>
- Loading branch information
1 parent
736c8bd
commit 25f1b33
Showing
8 changed files
with
131 additions
and
37 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,9 @@ | ||
name: "Set up Adopt OpenJDK 17" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 |
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,13 @@ | ||
name: "Lint code" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Set up Adopt OpenJDK 17" | ||
uses: ./.github/actions/java | ||
- name: "Run Detekt" | ||
shell: sh | ||
run: sh gradlew detekt | ||
- name: "Run KtLint" | ||
shell: sh | ||
run: sh gradlew ktlintCheck |
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,34 @@ | ||
name: "Lint and build code" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!main" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Clone code" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Lint code" | ||
uses: ./.github/actions/lint | ||
|
||
build: | ||
needs: lint | ||
runs-on: macos-latest | ||
steps: | ||
- name: "Clone code" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Set up Adopt OpenJDK 17" | ||
uses: ./.github/actions/java | ||
- name: "Validate Gradle wrapper" | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: "Build code" | ||
shell: sh | ||
run: sh gradlew 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,27 +1,44 @@ | ||
name: Publish | ||
name: "Lint and build code, and publish artifacts to repository" | ||
|
||
on: | ||
create: | ||
tags: | ||
- '^[0-9]+\.[0-9]+\.[0-9]+$' | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Clone code" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: "Lint code" | ||
uses: ./.github/actions/lint | ||
|
||
build: | ||
needs: lint | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: "Clone code" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Adopt OpenJDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- name: Validate Gradle wrapper | ||
- name: "Set up Adopt OpenJDK 17" | ||
uses: ./.github/actions/java | ||
- name: "Validate Gradle wrapper" | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Publish to GitHub Packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | ||
GITHUB_ACCESS_TOKEN_READ_PACKAGES: ${{ secrets.ACCESS_TOKEN_READ_PACKAGES }} | ||
shell: sh | ||
run: | | ||
sh gradlew --no-daemon publishAllPublicationsToAirthingsGitHubPackagesRepository | ||
|
||
publish: | ||
needs: build | ||
permissions: | ||
contents: write | ||
packages: write | ||
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/[email protected] | ||
with: | ||
runsOn: "macOS-14" | ||
jvmVersion: 17 | ||
versionBaseProperty: LIBRARY_VERSION | ||
publishTask: kmmBridgePublish publishAllPublicationsToGitHubPackagesRepository | ||
secrets: | ||
gradle_params: -PGITHUB_PUBLISH_USER=${{ secrets.GITHUB_ACTOR }} -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=https://github.com/Airthings/KmpLog.git |
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
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