Skip to content

Commit

Permalink
Configure CI (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Aug 30, 2023
1 parent f64cd03 commit 689df25
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
pull_request:
# Trigger on merges to `main` to allow `gradle/gradle-build-action` runs to write their caches.
# https://github.com/gradle/gradle-build-action#using-the-caches-read-only
push:
branches:
- main

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble

- name: check
uses: gradle/gradle-build-action@v2
with:
arguments: check

- name: publishToMavenLocal
uses: gradle/gradle-build-action@v2
with:
arguments: |
-PRELEASE_SIGNING_ENABLED=false
publishToMavenLocal
18 changes: 18 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Drafter
# https://github.com/release-drafter/release-drafter#usage

on:
push:
branches:
- main

jobs:
update-release-draft:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/signing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate Maven Signing
on:
push:
branches:
- main

jobs:
signing:
if: github.repository_owner == 'JuulLabs'
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: publishToMavenLocal
uses: gradle/gradle-build-action@v2
with:
arguments: |
-PsigningInMemoryKey=${{ secrets.SIGNING_KEY }}
-PsigningInMemoryKeyPassword=${{ secrets.SIGNING_PASSWORD }}
publishToMavenLocal
13 changes: 13 additions & 0 deletions .github/workflows/version-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Version Labels
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "patch, minor, major, maintenance, renovate"
2 changes: 1 addition & 1 deletion bundled/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ android {
compileSdk = libs.versions.android.compile.get().toInt()
defaultConfig.minSdk = libs.versions.android.min.get().toInt()

namespace = "com.juul.datadog-kmp.bundled"
namespace = "com.juul.datadog.bundled"

lint {
abortOnError = true
Expand Down
2 changes: 1 addition & 1 deletion datadog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ kotlin {
android {
compileSdk = libs.versions.android.compile.get().toInt()
defaultConfig.minSdk = libs.versions.android.min.get().toInt()
namespace = "com.juul.datadog-kmp"
namespace = "com.juul.datadog"
lint {
abortOnError = true
warningsAsErrors = true
Expand Down

0 comments on commit 689df25

Please sign in to comment.