kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
include firmware pre-releases
rodzic
3c2cf3b26a
commit
ca783bc301
|
@ -41,37 +41,40 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
# 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: Fetch firmware latest tag_name
|
- name: Find firmware release tag
|
||||||
id: firmware_latest
|
id: firmware_version
|
||||||
uses: gregziegan/fetch-latest-release@v2.0.0
|
uses: oprypin/find-latest-tag@v1
|
||||||
with:
|
with:
|
||||||
repo_path: meshtastic/Meshtastic-device
|
repository: meshtastic/Meshtastic-device
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
releases-only: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Get version strings from tag_name
|
- name: Create version strings
|
||||||
run: |
|
run: |
|
||||||
echo "CUR_FIRMWARE_VERSION=$(echo ${{ steps.firmware_latest.outputs.tag_name }}|sed -e 's/^v//')" >> $GITHUB_ENV
|
echo "CUR_FIRMWARE_VERSION=$(echo ${{ steps.firmware_version.outputs.tag }}|sed -e 's/^v//')" >> $GITHUB_ENV
|
||||||
echo "SHORT_FIRMWARE_VERSION=$(echo ${{ steps.firmware_latest.outputs.tag_name }}|sed -e 's/^v//' -e 's/.\{8\}$//')" >> $GITHUB_ENV
|
echo "SHORT_FIRMWARE_VERSION=$(echo ${{ steps.firmware_version.outputs.tag }}|sed -e 's/^v//' -e 's/.\{8\}$//')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create curfirmwareversion.xml latest
|
- name: Create curfirmwareversion.xml
|
||||||
run: |
|
run: |
|
||||||
rm ./app/src/main/res/values/curfirmwareversion.xml
|
rm ./app/src/main/res/values/curfirmwareversion.xml
|
||||||
echo -e "<resources>\n <string name=\"cur_firmware_version\" translatable=\"false\">${{ env.CUR_FIRMWARE_VERSION }}</string>\n <string name=\"short_firmware_version\" translatable=\"false\">${{ env.SHORT_FIRMWARE_VERSION }}</string>\n</resources>" > ./app/src/main/res/values/curfirmwareversion.xml
|
echo -e "<resources>\n <string name=\"cur_firmware_version\" translatable=\"false\">${{ env.CUR_FIRMWARE_VERSION }}</string>\n <string name=\"short_firmware_version\" translatable=\"false\">${{ env.SHORT_FIRMWARE_VERSION }}</string>\n</resources>" > ./app/src/main/res/values/curfirmwareversion.xml
|
||||||
|
|
||||||
- name: Pull firmware latest
|
- name: Fetch firmware release
|
||||||
uses: dsaltares/fetch-gh-release-asset@master
|
uses: dsaltares/fetch-gh-release-asset@master
|
||||||
with:
|
with:
|
||||||
repo: meshtastic/Meshtastic-device
|
repo: meshtastic/Meshtastic-device
|
||||||
file: firmware-${{ env.CUR_FIRMWARE_VERSION }}.zip
|
file: firmware-${{ env.CUR_FIRMWARE_VERSION }}.zip
|
||||||
|
version: tags/${{ steps.firmware_version.outputs.tag }}
|
||||||
target: firmware.zip
|
target: firmware.zip
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Unzip firmware into assets/firmware
|
- name: Unzip firmware into assets/firmware
|
||||||
run: |
|
run: |
|
||||||
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
|
||||||
unzip -qq firmware.zip 'firmware-*.bin' 'spiffs-*.bin' -d app/src/main/assets/firmware
|
unzip -qq ./firmware.zip 'spiffs-*.bin' 'firmware-heltec*.bin' 'firmware-tbeam*.bin' 'firmware-tlora*.bin' -d ./app/src/main/assets/firmware
|
||||||
rm firmware.zip
|
rm ./firmware.zip
|
||||||
|
|
||||||
- name: Validate Gradle wrapper
|
- name: Validate Gradle wrapper
|
||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue