Bump version to 1.30 #59
Workflow file for this run
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
name: Network Survey Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
api-level: [ 26, 34 ] | |
target: [ default, google_apis ] | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Save google-services.json | |
env: | |
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | |
run: echo "$GOOGLE_SERVICES" > networksurvey/google-services.json | |
- name: Unit Tests | |
run: ./gradlew test --stacktrace | |
# Only upload the reports on failure | |
- name: Upload Reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test-Reports | |
path: networksurvey/build/reports | |
if: failure() | |
buildRelease: | |
needs: test | |
runs-on: ubuntu-latest | |
outputs: | |
basename: ${{ steps.basenamestep.outputs.basename }} | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Save Keystore | |
env: | |
KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} | |
run: echo $KEYSTORE_FILE | base64 -d > my.keystore | |
- name: Save google-services.json | |
env: | |
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | |
run: echo "$GOOGLE_SERVICES" > networksurvey/google-services.json | |
- name: Build Regular Release APK | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
NS_API_KEY: ${{ secrets.NS_API_KEY }} | |
run: ./gradlew assembleRegularRelease | |
-Pandroid.injected.signing.store.file=$(pwd)/my.keystore | |
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD | |
-Pandroid.injected.signing.key.alias=$KEY_ALIAS | |
-Pandroid.injected.signing.key.password=$KEY_PASSWORD | |
-PnsApiKey=$NS_API_KEY | |
- name: Get base name | |
id: basenamestep | |
run: | | |
base_name=$(./gradlew :networksurvey:properties -q | grep 'archivesBaseName:' | awk '{print $2}') | |
echo "basename=$base_name" >> $GITHUB_ENV | |
echo "basename=$base_name" >> "$GITHUB_OUTPUT" | |
echo $base_name | |
- name: Upload Regular APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Network Survey Regular Release APK | |
path: networksurvey/build/outputs/apk/regular/release/${{ env.basename }}-regular-release.apk | |
- name: Build CDR Release APK | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
NS_API_KEY: ${{ secrets.NS_API_KEY }} | |
run: ./gradlew assembleCdrRelease | |
-Pandroid.injected.signing.store.file=$(pwd)/my.keystore | |
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD | |
-Pandroid.injected.signing.key.alias=$KEY_ALIAS | |
-Pandroid.injected.signing.key.password=$KEY_PASSWORD | |
-PnsApiKey=$NS_API_KEY | |
- name: Upload CDR APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Network Survey CDR Release APK | |
path: networksurvey/build/outputs/apk/cdr/release/${{ env.basename }}-cdr-release.apk | |
- name: Build Regular Release Bundle | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
NS_API_KEY: ${{ secrets.NS_API_KEY }} | |
run: ./gradlew bundleRelease | |
-Pandroid.injected.signing.store.file=$(pwd)/my.keystore | |
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD | |
-Pandroid.injected.signing.key.alias=$KEY_ALIAS | |
-Pandroid.injected.signing.key.password=$KEY_PASSWORD | |
-PnsApiKey=$NS_API_KEY | |
- name: Upload Release Bundle | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Network Survey Release Bundle | |
path: networksurvey/build/outputs/bundle/regularRelease/${{ env.basename }}-regular-release.aab | |
uploadRelease: | |
needs: buildRelease | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Regular APK | |
uses: actions/download-artifact@v4 | |
with: | |
name: Network Survey Regular Release APK | |
path: networksurvey/build/outputs/apk/regular/release/ | |
- name: Download CDR APK | |
uses: actions/download-artifact@v4 | |
with: | |
name: Network Survey CDR Release APK | |
path: networksurvey/build/outputs/apk/cdr/release/ | |
- name: Download Release Bundle | |
uses: actions/download-artifact@v4 | |
with: | |
name: Network Survey Release Bundle | |
path: networksurvey/build/outputs/bundle/regularRelease/ | |
- name: Create a Release in GitHub | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "networksurvey/build/outputs/apk/cdr/release/*.apk,networksurvey/build/outputs/apk/regular/release/*.apk" | |
token: ${{ secrets.GH_TOKEN }} | |
tag: ${{ steps.version.outputs.content }} | |
commit: ${{ github.sha }} | |
body: "The regular-release apk is the same as what can be found on the Google Play Store which contains the tracking library Google Analytics. The cdr-release apk is the same as the regular-release apk, but with full CDR support (See README.md for more details) and it also does NOT contain ANY tracking libraries such as Google Analytics." | |
generateReleaseNotes: true | |
draft: true | |
- name: Release app to internal track | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }} | |
packageName: com.craxiom.networksurvey | |
releaseFiles: networksurvey/build/outputs/bundle/regularRelease/${{ needs.buildRelease.outputs.basename }}-regular-release.aab | |
track: internal | |
status: completed |