-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
287 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# Copyright (c) 2021 Armel Soro | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 15 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 15 | ||
|
||
- uses: actions/cache@master | ||
#Using master because of the multi-paths feature (reportedly only available on master at the moment) | ||
with: | ||
path: | | ||
~/.gradle/wrapper | ||
~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Prepare scripts | ||
run: | | ||
chmod +x gradlew | ||
chmod +x tools/*.sh | ||
- name: Prepare local.properties | ||
run: | | ||
echo "github.username=${MAONI_GITHUB_USERNAME}" > local.properties | ||
echo "github.passwordToken=${MAONI_GITHUB_PASSWORD_TOKEN}" >> local.properties | ||
echo "jira.rest.baseUrl=${MAONI_JIRA_REST_BASEURL}" >> local.properties | ||
echo "jira.username=${MAONI_JIRA_USERNAME}" >> local.properties | ||
echo "jira.password=${MAONI_JIRA_PASSWORD}" >> local.properties | ||
- name: Prepare maoni-keystore.properties | ||
run: | | ||
mkdir -p ~/.droid | ||
echo "keystore=${KEYSTORE}" > ~/.droid/maoni-keystore.properties | ||
echo "storePassword=${STORE_PASSWORD}" >> ~/.droid/maoni-keystore.properties | ||
echo "keyAlias=${KEY_ALIAS}" >> ~/.droid/maoni-keystore.properties | ||
echo "keyPassword=${KEY_PASSWORD}" >> ~/.droid/maoni-keystore.properties | ||
- name: Download dependencies | ||
run: ./gradlew androidDependencies --stacktrace | ||
|
||
- name: Run Tests | ||
run: ./gradlew clean lintDebug testDebug --stacktrace | ||
|
||
- name: Build APK | ||
run: ./gradlew assembleDebug --stacktrace | ||
|
||
- name: Archive sample app artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: maoni-sample build outputs | ||
path: | | ||
maoni-sample/build/outputs | ||
- name: Archive build reports | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: reports | ||
path: | | ||
**/build/reports | ||
- name: Archive test results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: reports | ||
path: | | ||
**/build/test-results | ||
publishLibraries: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 15 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 15 | ||
|
||
# Base64 decodes and pipes the GPG key content into the secret file | ||
- name: Prepare environment | ||
env: | ||
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} | ||
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | ||
run: | | ||
git fetch --unshallow | ||
sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'" | ||
- uses: actions/cache@master | ||
#Using master because of the multi-paths feature (reportedly only available on master at the moment) | ||
with: | ||
path: | | ||
~/.gradle/wrapper | ||
~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
# Generates other artifacts (javadocJar is optional) | ||
- name: Build other artifacts | ||
run: ./gradlew javadoc | ||
|
||
# Runs upload, and then closes & releases the repository | ||
- name: Publish to MavenCentral | ||
run: ./gradlew publishToSonatype --max-workers 1 closeAndReleaseStagingRepository | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | ||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2021 Armel Soro | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
report_coverage: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Code Coverage | ||
run: bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2021 Armel Soro | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
name: Translations | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
import_translations: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Prepare scripts | ||
run: chmod +x tools/import-translations-github.sh | ||
|
||
- name: Import translations from Crowdin if needed | ||
run: ./tools/import-translations-github.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2021 Armel Soro | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
name: Website | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
update_gh_pages_branch: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Prepare scripts | ||
run: chmod +x tools/update-github-pages.sh | ||
|
||
- name: Update Github Pages branch | ||
run: ./tools/update-github-pages.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters