Files
GNSSTimeServer/.github/workflows/release.yml
Ryzenski 9ae692448d Update release.yml
updated actions to use node.js 20
2024-04-04 23:05:00 -04:00

62 lines
1.7 KiB
YAML

name: Firmware release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Extract build version
id: get_version
uses: battila7/get-version-action@v2
- name: Run PlatformIO
env:
VERSION: ${{ steps.get_version.outputs.version-without-v }}
run: pio run
- name: Rename Firmware
run: env
- run: mv .pio/build/ESP32Duino/firmware.bin .pio/build/ESP32Duino/firmware-ESP32Duino-$GITHUB_REF_NAME.bin
- run: mv .pio/build/Amica/firmware.bin .pio/build/Amica/firmware-Amica-$GITHUB_REF_NAME.bin
- run: mv .pio/build/ESP32Duino_Ethernet/firmware.bin .pio/build/ESP32Duino_Ethernet/firmware-ESP32Duino_Ethernet-$GITHUB_REF_NAME.bin
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: firmware
path: .pio/build/**/mobiflight*.bin
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: .pio/build/**/firmware*.bin