|
| 1 | +# Copyright 2020 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +name: Release |
| 16 | +on: |
| 17 | + push: |
| 18 | + branches: [ main ] |
| 19 | +jobs: |
| 20 | + release: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v2 |
| 25 | + with: |
| 26 | + token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} |
| 27 | + - name: Build APKs |
| 28 | + run: | |
| 29 | + echo "Generating ApiDemos (Java) APKs" |
| 30 | + cd ./ApiDemos/java |
| 31 | + ./gradlew assembleV3 assembleGms |
| 32 | + cp ./app/build/outputs/apk/gms/debug/app-gms-debug.apk $GITHUB_WORKSPACE/ApiDemos-java-gms-debug.apk |
| 33 | + cp ./app/build/outputs/apk/v3/debug/app-v3-debug.apk $GITHUB_WORKSPACE/ApiDemos-java-v3-debug.apk |
| 34 | +
|
| 35 | + echo "Generating Kotlin (Kotlin) APKs" |
| 36 | + cd ./ApiDemos/kotlin |
| 37 | + ./gradlew assembleV3 assembleGms |
| 38 | + cp ./app/build/outputs/apk/gms/debug/app-gms-debug.apk $GITHUB_WORKSPACE/ApiDemos-kotlin-gms-debug.apk |
| 39 | + cp ./app/build/outputs/apk/v3/debug/app-v3-debug.apk $GITHUB_WORKSPACE/ApiDemos-kotlin-v3-debug.apk |
| 40 | +
|
| 41 | + - name: Semantic Release |
| 42 | + uses: cycjimmy/semantic-release-action@v2 |
| 43 | + with: |
| 44 | + extra_plugins: | |
| 45 | + "@semantic-release/commit-analyzer" |
| 46 | + "@semantic-release/release-notes-generator" |
| 47 | + "@google/semantic-release-replace-plugin" |
| 48 | + "@semantic-release/git |
| 49 | + "@semantic-release/github |
| 50 | + env: |
| 51 | + GH_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} |
0 commit comments