mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 02:45:41 +00:00
Actions: pull_request_target is fun
This commit is contained in:
parent
32418448de
commit
f8792a14fc
14
.github/workflows/build_esp32.yml
vendored
14
.github/workflows/build_esp32.yml
vendored
@ -3,6 +3,9 @@ name: Build ESP32
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build ESP32
|
- name: Build ESP32
|
||||||
id: build
|
id: build
|
||||||
@ -33,7 +35,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-esp32-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-esp32-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
|
14
.github/workflows/build_esp32_c3.yml
vendored
14
.github/workflows/build_esp32_c3.yml
vendored
@ -3,6 +3,9 @@ name: Build ESP32-C3
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build ESP32-C3
|
- name: Build ESP32-C3
|
||||||
id: build
|
id: build
|
||||||
@ -33,7 +35,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-esp32c3-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-esp32c3-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
|
14
.github/workflows/build_esp32_c6.yml
vendored
14
.github/workflows/build_esp32_c6.yml
vendored
@ -3,6 +3,9 @@ name: Build ESP32-C6
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build ESP32-C6
|
- name: Build ESP32-C6
|
||||||
id: build
|
id: build
|
||||||
@ -33,7 +35,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-esp32c6-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-esp32c6-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
|
14
.github/workflows/build_esp32_s3.yml
vendored
14
.github/workflows/build_esp32_s3.yml
vendored
@ -3,6 +3,9 @@ name: Build ESP32-S3
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build ESP32-S3
|
- name: Build ESP32-S3
|
||||||
id: build
|
id: build
|
||||||
@ -33,7 +35,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-esp32s3-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-esp32s3-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.bin
|
release/*.bin
|
||||||
|
14
.github/workflows/build_nrf52.yml
vendored
14
.github/workflows/build_nrf52.yml
vendored
@ -3,6 +3,9 @@ name: Build NRF52
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build NRF52
|
- name: Build NRF52
|
||||||
id: build
|
id: build
|
||||||
@ -31,7 +33,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-nrf52840-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-nrf52840-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.uf2
|
release/*.uf2
|
||||||
|
14
.github/workflows/build_rpi2040.yml
vendored
14
.github/workflows/build_rpi2040.yml
vendored
@ -3,6 +3,9 @@ name: Build RPI2040
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build Raspberry Pi 2040
|
- name: Build Raspberry Pi 2040
|
||||||
id: build
|
id: build
|
||||||
@ -31,7 +33,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-rp2040-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-rp2040-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.uf2
|
release/*.uf2
|
||||||
|
14
.github/workflows/build_stm32.yml
vendored
14
.github/workflows/build_stm32.yml
vendored
@ -3,6 +3,9 @@ name: Build STM32
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
board:
|
board:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@ -14,11 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: Get release version string
|
submodules: recursive
|
||||||
shell: bash
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Build STM32WL
|
- name: Build STM32WL
|
||||||
id: build
|
id: build
|
||||||
@ -31,7 +33,7 @@ jobs:
|
|||||||
- name: Store binaries as an artifact
|
- name: Store binaries as an artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-stm32-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
|
name: firmware-stm32-${{ inputs.board }}-${{ inputs.version }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
release/*.hex
|
release/*.hex
|
||||||
|
112
.github/workflows/main_matrix.yml
vendored
112
.github/workflows/main_matrix.yml
vendored
@ -33,9 +33,7 @@ jobs:
|
|||||||
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check]
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32, check]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- id: checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
name: Checkout base
|
|
||||||
- id: jsonStep
|
- id: jsonStep
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
|
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
|
||||||
@ -55,6 +53,21 @@ jobs:
|
|||||||
stm32: ${{ steps.jsonStep.outputs.stm32 }}
|
stm32: ${{ steps.jsonStep.outputs.stm32 }}
|
||||||
check: ${{ steps.jsonStep.outputs.check }}
|
check: ${{ steps.jsonStep.outputs.check }}
|
||||||
|
|
||||||
|
version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
env:
|
||||||
|
BUILD_LOCATION: local
|
||||||
|
outputs:
|
||||||
|
long: ${{ steps.version.outputs.long }}
|
||||||
|
deb: ${{ steps.version.outputs.deb }}
|
||||||
|
|
||||||
check:
|
check:
|
||||||
needs: setup
|
needs: setup
|
||||||
strategy:
|
strategy:
|
||||||
@ -72,66 +85,73 @@ jobs:
|
|||||||
run: bin/check-all.sh ${{ matrix.board }}
|
run: bin/check-all.sh ${{ matrix.board }}
|
||||||
|
|
||||||
build-esp32:
|
build-esp32:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32) }}
|
||||||
uses: ./.github/workflows/build_esp32.yml
|
uses: ./.github/workflows/build_esp32.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-esp32-s3:
|
build-esp32-s3:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32s3) }}
|
||||||
uses: ./.github/workflows/build_esp32_s3.yml
|
uses: ./.github/workflows/build_esp32_s3.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-esp32-c3:
|
build-esp32-c3:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32c3) }}
|
||||||
uses: ./.github/workflows/build_esp32_c3.yml
|
uses: ./.github/workflows/build_esp32_c3.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-esp32-c6:
|
build-esp32-c6:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.esp32c6) }}
|
matrix: ${{ fromJson(needs.setup.outputs.esp32c6) }}
|
||||||
uses: ./.github/workflows/build_esp32_c6.yml
|
uses: ./.github/workflows/build_esp32_c6.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-nrf52:
|
build-nrf52:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
|
matrix: ${{ fromJson(needs.setup.outputs.nrf52840) }}
|
||||||
uses: ./.github/workflows/build_nrf52.yml
|
uses: ./.github/workflows/build_nrf52.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-rpi2040:
|
build-rpi2040:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
|
matrix: ${{ fromJson(needs.setup.outputs.rp2040) }}
|
||||||
uses: ./.github/workflows/build_rpi2040.yml
|
uses: ./.github/workflows/build_rpi2040.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-stm32:
|
build-stm32:
|
||||||
needs: setup
|
needs: [setup, version]
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
|
matrix: ${{ fromJson(needs.setup.outputs.stm32) }}
|
||||||
uses: ./.github/workflows/build_stm32.yml
|
uses: ./.github/workflows/build_stm32.yml
|
||||||
with:
|
with:
|
||||||
|
version: ${{ needs.version.outputs.long }}
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
build-debian-src:
|
build-debian-src:
|
||||||
@ -214,6 +234,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
[
|
[
|
||||||
|
version,
|
||||||
build-esp32,
|
build-esp32,
|
||||||
build-esp32-s3,
|
build-esp32-s3,
|
||||||
build-esp32-c3,
|
build-esp32-c3,
|
||||||
@ -238,17 +259,13 @@ jobs:
|
|||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- name: Move files up
|
- name: Move files up
|
||||||
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
run: mv -b -t ./ ./bin/device-*.sh ./bin/device-*.bat
|
||||||
|
|
||||||
- name: Repackage in single firmware zip
|
- name: Repackage in single firmware zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: |
|
path: |
|
||||||
./firmware-*.bin
|
./firmware-*.bin
|
||||||
@ -264,7 +281,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
@ -278,12 +295,12 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
- name: Repackage in single elfs zip
|
- name: Repackage in single elfs zip
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
||||||
overwrite: true
|
overwrite: true
|
||||||
path: ./*.elf
|
path: ./*.elf
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
@ -291,8 +308,8 @@ jobs:
|
|||||||
- uses: scruplelesswizard/comment-artifact@main
|
- uses: scruplelesswizard/comment-artifact@main
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
with:
|
with:
|
||||||
name: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
||||||
description: "Download firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
description: "Download firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip. This artifact will be available for 90 days from creation"
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-artifacts:
|
release-artifacts:
|
||||||
@ -301,6 +318,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
needs:
|
needs:
|
||||||
|
- version
|
||||||
- gather-artifacts
|
- gather-artifacts
|
||||||
- build-debian-src
|
- build-debian-src
|
||||||
- package-pio-deps-native-tft
|
- package-pio-deps-native-tft
|
||||||
@ -313,44 +331,36 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: |
|
|
||||||
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
echo "deb=$(./bin/buildinfo.py deb)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
env:
|
|
||||||
BUILD_LOCATION: local
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
id: create_release
|
id: create_release
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
name: Meshtastic Firmware ${{ steps.version.outputs.long }} Alpha
|
name: Meshtastic Firmware ${{ needs.version.outputs.long }} Alpha
|
||||||
tag_name: v${{ steps.version.outputs.long }}
|
tag_name: v${{ needs.version.outputs.long }}
|
||||||
body: |
|
body: |
|
||||||
Autogenerated by github action, developer should edit as required before publishing...
|
Autogenerated by github action, developer should edit as required before publishing...
|
||||||
|
|
||||||
- name: Download source deb
|
- name: Download source deb
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-debian-${{ steps.version.outputs.deb }}~UNRELEASED-src
|
pattern: firmware-debian-${{ needs.version.outputs.deb }}~UNRELEASED-src
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output/debian-src
|
path: ./output/debian-src
|
||||||
|
|
||||||
- name: Download `native-tft` pio deps
|
- name: Download `native-tft` pio deps
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: platformio-deps-native-tft-${{ steps.version.outputs.long }}
|
pattern: platformio-deps-native-tft-${{ needs.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output/pio-deps-native-tft
|
path: ./output/pio-deps-native-tft
|
||||||
|
|
||||||
- name: Zip Linux sources
|
- name: Zip Linux sources
|
||||||
working-directory: output
|
working-directory: output
|
||||||
run: |
|
run: |
|
||||||
zip -j -9 -r ./meshtasticd-${{ steps.version.outputs.deb }}-src.zip ./debian-src
|
zip -j -9 -r ./meshtasticd-${{ needs.version.outputs.deb }}-src.zip ./debian-src
|
||||||
zip -9 -r ./platformio-deps-native-tft-${{ steps.version.outputs.long }}.zip ./pio-deps-native-tft
|
zip -9 -r ./platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip ./pio-deps-native-tft
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
@ -360,8 +370,8 @@ jobs:
|
|||||||
# Only run when targeting master branch with workflow_dispatch
|
# Only run when targeting master branch with workflow_dispatch
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip
|
gh release upload v${{ needs.version.outputs.long }} ./output/meshtasticd-${{ needs.version.outputs.deb }}-src.zip
|
||||||
gh release upload v${{ steps.version.outputs.long }} ./output/platformio-deps-native-tft-${{ steps.version.outputs.long }}.zip
|
gh release upload v${{ needs.version.outputs.long }} ./output/platformio-deps-native-tft-${{ needs.version.outputs.long }}.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@ -372,7 +382,7 @@ jobs:
|
|||||||
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
arch: [esp32, esp32s3, esp32c3, esp32c6, nrf52840, rp2040, stm32]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [release-artifacts]
|
needs: [release-artifacts, version]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -382,13 +392,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}
|
pattern: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./output
|
path: ./output
|
||||||
|
|
||||||
@ -401,16 +407,16 @@ jobs:
|
|||||||
chmod +x ./output/device-update.sh
|
chmod +x ./output/device-update.sh
|
||||||
|
|
||||||
- name: Zip firmware
|
- name: Zip firmware
|
||||||
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./output
|
run: zip -j -9 -r ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./output
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./elfs
|
path: ./elfs
|
||||||
|
|
||||||
- name: Zip debug elfs
|
- name: Zip debug elfs
|
||||||
run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip ./elfs
|
run: zip -j -9 -r ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip ./elfs
|
||||||
|
|
||||||
# For diagnostics
|
# For diagnostics
|
||||||
- name: Display structure of downloaded files
|
- name: Display structure of downloaded files
|
||||||
@ -420,15 +426,15 @@ jobs:
|
|||||||
# Only run when targeting master branch with workflow_dispatch
|
# Only run when targeting master branch with workflow_dispatch
|
||||||
if: ${{ github.ref_name == 'master' }}
|
if: ${{ github.ref_name == 'master' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload v${{ steps.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
gh release upload v${{ needs.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
||||||
gh release upload v${{ steps.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip
|
gh release upload v${{ needs.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
publish-firmware:
|
publish-firmware:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
needs: [release-firmware]
|
needs: [release-firmware, version]
|
||||||
env:
|
env:
|
||||||
targets: esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,stm32
|
targets: esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,stm32
|
||||||
steps:
|
steps:
|
||||||
@ -440,13 +446,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Get release version string
|
|
||||||
run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
|
||||||
id: version
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: firmware-{${{ env.targets }}}-${{ steps.version.outputs.long }}
|
pattern: firmware-{${{ env.targets }}}-${{ needs.version.outputs.long }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
path: ./publish
|
path: ./publish
|
||||||
|
|
||||||
@ -460,9 +462,9 @@ jobs:
|
|||||||
external_repository: meshtastic/meshtastic.github.io
|
external_repository: meshtastic/meshtastic.github.io
|
||||||
publish_branch: master
|
publish_branch: master
|
||||||
publish_dir: ./publish
|
publish_dir: ./publish
|
||||||
destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ steps.version.outputs.long }}
|
destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ needs.version.outputs.long }}
|
||||||
keep_files: true
|
keep_files: true
|
||||||
user_name: github-actions[bot]
|
user_name: github-actions[bot]
|
||||||
user_email: github-actions[bot]@users.noreply.github.com
|
user_email: github-actions[bot]@users.noreply.github.com
|
||||||
commit_message: ${{ steps.version.outputs.long }}
|
commit_message: ${{ needs.version.outputs.long }}
|
||||||
enable_jekyll: true
|
enable_jekyll: true
|
||||||
|
Loading…
Reference in New Issue
Block a user