-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): Migrate develop Push CircleCI to GithubAction
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 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,64 @@ | ||
name: GLPI Android Inventory Library Deploy Alpha | ||
|
||
env: | ||
module_app: app | ||
|
||
on: | ||
push: | ||
branches: | ||
- "develop" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Update Android Version code | ||
run: ./gradlew updateVersionCode | ||
|
||
- name: Extract Release Version | ||
run: echo "release_version=$(jq -r ".version" package.json)" >> $GITHUB_ENV | ||
|
||
- name: Extract App VersionCode | ||
run: echo "app_version_code=$(grep versionCode ./app/src/main/AndroidManifest.xml | cut -d\" -f2)" >> $GITHUB_ENV | ||
|
||
- name: Update About Data | ||
run : echo "about.version=${{ env.release_version }}" > ./app/src/main/assets/about.properties | ||
run : echo "about.build=${{ env.app_version_code }}" >> ./app/src/main/assets/about.properties | ||
run : echo "about.date=$(date "+%a %b %d %H:%M:%S %Y")" >> ./app/src/main/assets/about.properties | ||
run : echo "about.commit=$(git rev-parse --short "$GITHUB_SHA")" >> ./app/src/main/assets/about.properties | ||
run : echo "about.commitFull=$(git rev-parse "$GITHUB_SHA")" >> ./app/src/main/assets/about.properties | ||
run : echo "about.github=https://github.com/glpi-project/android-inventory-agent" >> ./app/src/main/assets/about.properties | ||
|
||
- name: Cat About Data | ||
run : cat ./app/src/main/assets/about.properties | ||
|
||
|
||
# Push Transifex | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
with: | ||
arg: push --source --no-interactive | ||
token: ${{ secrets.TX_TOKEN }} | ||
|
||
# Pull from Transifex | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
with: | ||
arg: pull --all --force | ||
token: ${{ secrets.TX_TOKEN }} | ||
|
||
# Build app | ||
- name: Build with Gradle | ||
run: ./gradlew assemble | ||
|
||
- run: fastlane alpha | ||
env: | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} |