Skip to content

Commit

Permalink
iterate publishing config
Browse files Browse the repository at this point in the history
  • Loading branch information
sargunv committed Nov 24, 2024
1 parent 9c168c0 commit bc0640a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
cancel-in-progress: true

jobs:
format:
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: ./.github/actions/setup
- run: ./gradlew iosSimulatorArm64Test

artifact-docs:
build-docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -53,7 +53,7 @@ jobs:
with:
path: build/dokka/htmlMultiModule

artifact-android-demo-app:
build-android-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -73,8 +73,17 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: macos-latest
permissions:
actions: write
packages: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
env:
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_githubUser: ${{ github.actor }}

all-good:
needs: [check-format, lint-android, test-android, test-ios, build-docs, build-android-app]
runs-on: ubuntu-latest
steps:
- run: echo "All checks passed!"
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
workflow_dispatch:

jobs:
maven:
publish-maven:
runs-on: macos-latest
environment:
name: maven
url: https://central.sonatype.com/artifact/dev.sargunv/maplibre-compose
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
Expand Down Expand Up @@ -33,8 +36,8 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ steps.import-gpg.outputs.key_id }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSPHRASE }}

pages:
needs: [maven]
publish-pages:
needs: [publish-maven]
runs-on: macos-latest
permissions:
pages: write
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In your Gradle version catalog, add:
```toml
[libraries]
# ...
maplibre-compose = { module = "dev.sargunv:maplibre-compose", version = "(TODO)" }
maplibre-compose = { module = "dev.sargunv.maplibre-compose:maplibre-compose", version = "(TODO)" }
```

In your Gradle build script, add:
Expand Down
6 changes: 3 additions & 3 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ plugins { id("maven-publish") }

subprojects {
apply(plugin = "maven-publish")
group = "dev.sargunv"
group = "dev.sargunv.maplibre-compose"

publishing {
repositories {
maven {
name = "GitHubPackages"
setUrl("https://maven.pkg.github.com/sargunv/maplibre-compose")
credentials {
username = project.properties["GITHUB_USERNAME"]?.toString()
password = project.properties["GITHUB_TOKEN"]?.toString()
username = project.properties["githubUser"]?.toString()
password = project.properties["githubToken"]?.toString()
}
}
}
Expand Down

0 comments on commit bc0640a

Please sign in to comment.