sforkowany z mirror/meshtastic-android
ci: get versionName from app/build.gradle for release action
rodzic
edf1264e5e
commit
f17f9e1ec5
|
@ -1,13 +1,10 @@
|
||||||
name: Make Release
|
name: Make Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: "Release version (Example: 1.0.0, must match app/gradle.build 'versionName')"
|
|
||||||
required: true
|
|
||||||
default: '1.0.0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
release-build:
|
release-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -17,6 +14,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
|
- name: Get versionName
|
||||||
|
run: echo "versionName=$(grep -oP 'versionName \"\K[^\"]+' ./app/build.gradle)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Validate Gradle wrapper
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
- name: Load secrets
|
- name: Load secrets
|
||||||
run: |
|
run: |
|
||||||
rm ./app/google-services.json
|
rm ./app/google-services.json
|
||||||
|
@ -33,7 +36,7 @@ jobs:
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
distribution: 'temurin'
|
distribution: 'zulu'
|
||||||
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
# Note: we don't use caches on release builds because we don't want to accidentally not have a virgin build machine
|
||||||
|
|
||||||
- name: Find firmware release tag
|
- name: Find firmware release tag
|
||||||
|
@ -75,9 +78,6 @@ jobs:
|
||||||
rm -rf ./app/src/main/assets/firmware
|
rm -rf ./app/src/main/assets/firmware
|
||||||
mkdir -p ./app/src/main/assets/firmware
|
mkdir -p ./app/src/main/assets/firmware
|
||||||
|
|
||||||
- name: Validate Gradle wrapper
|
|
||||||
uses: gradle/wrapper-validation-action@v1
|
|
||||||
|
|
||||||
- name: Build F-Droid release
|
- name: Build F-Droid release
|
||||||
run: ./gradlew assembleFdroidRelease
|
run: ./gradlew assembleFdroidRelease
|
||||||
|
|
||||||
|
@ -104,8 +104,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
release_name: Meshtastic Android ${{ github.event.inputs.version}} alpha
|
release_name: Meshtastic Android ${{ env.versionName }} alpha
|
||||||
tag_name: ${{ github.event.inputs.version}}
|
tag_name: ${{ env.versionName }}
|
||||||
body: |
|
body: |
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
env:
|
env:
|
||||||
|
@ -118,7 +118,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: app/build/outputs/apk/fdroid/release/app-fdroid-release.apk
|
asset_path: app/build/outputs/apk/fdroid/release/app-fdroid-release.apk
|
||||||
asset_name: fdroidRelease-${{ github.event.inputs.version}}.apk
|
asset_name: fdroidRelease-${{ env.versionName }}.apk
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
- name: Add Play Store AAB to release
|
- name: Add Play Store AAB to release
|
||||||
|
@ -128,7 +128,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: app/build/outputs/bundle/googleRelease/app-google-release.aab
|
asset_path: app/build/outputs/bundle/googleRelease/app-google-release.aab
|
||||||
asset_name: googleRelease-${{ github.event.inputs.version}}.aab
|
asset_name: googleRelease-${{ env.versionName }}.aab
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
- name: Add Play Store APK to release
|
- name: Add Play Store APK to release
|
||||||
|
@ -138,7 +138,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
asset_path: app/build/outputs/apk/google/release/app-google-release.apk
|
asset_path: app/build/outputs/apk/google/release/app-google-release.apk
|
||||||
asset_name: googleRelease-${{ github.event.inputs.version}}.apk
|
asset_name: googleRelease-${{ env.versionName }}.apk
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
|
||||||
# - name: Gradle publishBundle
|
# - name: Gradle publishBundle
|
||||||
|
|
Ładowanie…
Reference in New Issue