Skip to content

Commit

Permalink
feat: Add Android lib files.
Browse files Browse the repository at this point in the history
  • Loading branch information
arriolac committed Oct 4, 2021
1 parent 3c4c3aa commit 281b6ae
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/sync-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ group:
# gh repo list googlemaps --public --source --no-archived --json name | jq '.[] | .name'
repos: |
googlemaps/.github
googlemaps/android-v3-migration
googlemaps/android-maps-ktx
googlemaps/android-maps-rx
googlemaps/android-maps-utils
Expand Down Expand Up @@ -74,3 +75,16 @@ group:
googlemaps/playablelocations-proxy
googlemaps/react-wrapper
googlemaps/semantic-release-config
# Android Library files
- files:
- source: sync-files/android/.github/
dest: .github/
- source: sync-files/android/.releaserc
dest: .releaserc
repos: |
googlemaps/android-maps-ktx
googlemaps/android-maps-rx
googlemaps/android-maps-utils
googlemaps/android-places-ktx
googlemaps/android-v3-migration
# Exclude Android sample repos
Binary file added sync-files/android/.DS_Store
Binary file not shown.
59 changes: 59 additions & 0 deletions sync-files/android/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# 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: Release
on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
- uses: gradle/wrapper-validation-action@v1.0.4
- name: Create .gpg key
run: |
echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc
gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc
echo "Build and publish"
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties
env:
GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}"
GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }}
GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }}
SONATYPE_PASSWORD: ${{ secrets.SYNCED_SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SYNCED_SONATYPE_USERNAME }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
"@semantic-release/commit-analyzer"
"@semantic-release/release-notes-generator"
"@google/semantic-release-replace-plugin"
"@semantic-release/exec"
"@semantic-release/git
"@semantic-release/github
env:
GH_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
46 changes: 46 additions & 0 deletions sync-files/android/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.

# A workflow that runs tests on every new pull request
name: Run unit tests

on:
repository_dispatch:
types: [test]
push:
branches: ['*']
pull_request:
branches: ['*']
workflow_dispatch:

jobs:
run-unit-test:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v2

- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4

- name: Set up JDK 11
uses: actions/setup-java@v2.3.0
with:
java-version: '11'
distribution: 'adopt'

- name: Build modules
run: ./gradlew build jacocoTestReport --stacktrace
25 changes: 25 additions & 0 deletions sync-files/android/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
branches:
- main
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- - "@google/semantic-release-replace-plugin"
- replacements:
- files:
- "./build.gradle(.kts)?"
from: "\\bversion = '.*'"
to: "version = '${nextRelease.version}'"
- files:
- "README.md"
from: "ktx:[0-9].[0-9].[0-9]"
to: "ktx:${nextRelease.version}"
- - "@semantic-release/exec"
- prepareCmd: "./gradlew build --warn --stacktrace"
publishCmd: "./gradlew publish --warn --stacktrace"
- - "@semantic-release/git"
- assets:
- "./build.gradle(.kts)?"
- "*.md"
- "@semantic-release/github"
options:
debug: true

0 comments on commit 281b6ae

Please sign in to comment.