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
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Release version (Example: 1.0.0, must match app/gradle.build 'versionName')"
|
||||
required: true
|
||||
default: '1.0.0'
|
||||
|
||||
jobs:
|
||||
|
||||
release-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -17,6 +14,12 @@ jobs:
|
|||
with:
|
||||
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
|
||||
run: |
|
||||
rm ./app/google-services.json
|
||||
|
@ -33,7 +36,7 @@ jobs:
|
|||
uses: actions/setup-java@v3
|
||||
with:
|
||||
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
|
||||
|
||||
- name: Find firmware release tag
|
||||
|
@ -75,9 +78,6 @@ jobs:
|
|||
rm -rf ./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
|
||||
run: ./gradlew assembleFdroidRelease
|
||||
|
||||
|
@ -104,8 +104,8 @@ jobs:
|
|||
with:
|
||||
draft: true
|
||||
prerelease: true
|
||||
release_name: Meshtastic Android ${{ github.event.inputs.version}} alpha
|
||||
tag_name: ${{ github.event.inputs.version}}
|
||||
release_name: Meshtastic Android ${{ env.versionName }} alpha
|
||||
tag_name: ${{ env.versionName }}
|
||||
body: |
|
||||
Autogenerated by github action, developer should edit as required before publishing...
|
||||
env:
|
||||
|
@ -118,7 +118,7 @@ jobs:
|
|||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
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
|
||||
|
||||
- name: Add Play Store AAB to release
|
||||
|
@ -128,7 +128,7 @@ jobs:
|
|||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
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
|
||||
|
||||
- name: Add Play Store APK to release
|
||||
|
@ -138,7 +138,7 @@ jobs:
|
|||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
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
|
||||
|
||||
# - name: Gradle publishBundle
|
||||
|
|
Ładowanie…
Reference in New Issue