Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 14 additions & 42 deletions .github/workflows/release.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Publish

name: Release
on:
push:
branches: [ main ]
workflow_dispatch:
release:
types: [published]

jobs:
release:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}

- uses: gradle/actions/wrapper-validation@v4

- name: Set up JDK 21
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4.7.1
with:
java-version: '21'
distribution: 'adopt'
- name: Set up Gradle Publishing Environment Variables

- name: Create .gpg key
run: |
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
Expand All @@ -46,28 +35,11 @@ jobs:
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties

env:
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN }}
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
GPG_KEY_ARMOR: ${{ secrets.SYNCED_GPG_KEY_ARMOR }}
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version: '14'

- name: Install conventionalcommits
run: npm i -D conventional-changelog-conventionalcommits

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4.2.1
with:
extra_plugins: |
"@semantic-release/commit-analyzer@8.0.1"
"@semantic-release/release-notes-generator@9.0.3"
"@google/semantic-release-replace-plugin@1.2.0"
"@semantic-release/exec@5.0.0"
"@semantic-release/git@9.0.1"
"@semantic-release/github@7.2.3"
env:
GH_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- name: Publish to MavenCentral
run: ./gradlew publishToMavenCentral --warn --stacktrace
20 changes: 20 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "6.12.2"
}
25 changes: 0 additions & 25 deletions .releaserc

This file was deleted.

8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ You no longer need to specify the Maps SDK for Android or its Utility Library as

```groovy
dependencies {
implementation 'com.google.maps.android:maps-compose:6.12.2'

implementation 'com.google.maps.android:maps-compose:6.12.2' // {x-release-please-version}
// Optionally, you can include the Compose utils library for Clustering,
// Street View metadata checks, etc.
implementation 'com.google.maps.android:maps-compose-utils:6.12.2'

implementation 'com.google.maps.android:maps-compose-utils:6.12.2' // {x-release-please-version}
// Optionally, you can include the widgets library for ScaleBar, etc.
implementation 'com.google.maps.android:maps-compose-widgets:6.12.2'
implementation 'com.google.maps.android:maps-compose-widgets:6.12.2' // {x-release-please-version}
}
```

Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ val projectArtifactId by extra { project: Project ->

allprojects {
group = "com.google.maps.android"
// {x-release-please-start-version}
version = "6.12.2"
// {x-release-please-end}
}
4 changes: 0 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ android.nonTransitiveRClass=false
android.nonFinalResIds=false

android.experimental.enableScreenshotTest=true

# Add a property to enable automatic release to Maven Central (optional, but good for CI)
# If true, publishToMavenCentral will also close and release the staging repository
mavenCentralAutomaticRelease=false
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"packages": {
".": {
"release-type": "simple",
"extra-files": [
"build.gradle.kts",
"README.md"
]
}
}
}