Tasmota/.github/workflows/Tasmota_build_master.yml

237 lines
7.4 KiB
YAML
Raw Normal View History

2021-07-29 21:59:25 +01:00
name: Build_firmware_master
2020-12-23 16:10:10 +00:00
on:
2023-05-23 15:55:19 +01:00
workflow_dispatch: # Start a workflow
2020-12-23 16:10:10 +00:00
push:
branches: master
2021-07-29 21:59:25 +01:00
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
- '**.md' # Do no build if *.md files changes
2020-12-23 16:10:10 +00:00
2022-01-18 14:00:24 +00:00
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
2020-12-23 16:10:10 +00:00
jobs:
safeboot-images:
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
- tasmota32-safeboot
- tasmota32solo1-safeboot
- tasmota32c2-safeboot
2024-04-15 15:47:49 +01:00
- tasmota32c3-safeboot
- tasmota32c3ser-safeboot
- tasmota32s2-safeboot
2024-04-15 15:47:49 +01:00
- tasmota32s2cdc-safeboot
- tasmota32s3-safeboot
- tasmota32s3ser-safeboot
2024-04-15 15:47:49 +01:00
- tasmota32c6-safeboot
- tasmota32c6ser-safeboot
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
with:
ref: master
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
2023-11-14 22:44:34 +00:00
cp ./platformio_override_sample.ini ./platformio_override.ini
2024-02-29 15:33:37 +00:00
- name: Add "release" to footer
run: |
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload safeboot firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
with:
name: firmware_safeboot
path: ./build_output
2021-12-12 16:15:43 +00:00
base-images:
runs-on: ubuntu-latest
2021-12-12 16:21:31 +00:00
if: github.repository == 'arendst/Tasmota'
2021-12-12 16:15:43 +00:00
continue-on-error: true
strategy:
matrix:
variant:
- tasmota
- tasmota-4M
2021-12-12 16:15:43 +00:00
- tasmota-minimal
- tasmota-display
- tasmota-ir
- tasmota-knx
- tasmota-lite
- tasmota-sensors
- tasmota-zbbridge
- tasmota-zigbee
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
with:
ref: master
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
cp ./platformio_override_sample.ini ./platformio_override.ini
2024-02-29 15:33:37 +00:00
- name: Add "release" to footer
run: |
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
with:
name: firmware
path: ./build_output
base32-images:
needs: safeboot-images
runs-on: ubuntu-latest
if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
variant:
2021-12-12 16:15:43 +00:00
- tasmota32
2022-06-02 19:44:00 +01:00
- tasmota32-zbbrdgpro
2021-12-12 16:15:43 +00:00
- tasmota32-webcam
- tasmota32-bluetooth
2022-06-02 19:44:00 +01:00
- tasmota32-nspanel
2021-12-12 16:15:43 +00:00
- tasmota32-display
- tasmota32-ir
- tasmota32-lvgl
- tasmota32c2
- tasmota32c3
- tasmota32c6
2022-05-21 14:14:17 +01:00
- tasmota32s2
2022-06-07 15:37:10 +01:00
- tasmota32s2cdc
- tasmota32s3
2021-12-12 16:15:43 +00:00
- tasmota32solo1
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2021-12-12 22:36:46 +00:00
with:
ref: master
2021-12-12 16:15:43 +00:00
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2022-10-25 10:41:21 +01:00
with:
python-version: '3.x'
2021-12-12 16:15:43 +00:00
- name: Install dependencies
run: |
2022-09-18 12:32:48 +01:00
pip install wheel
pip install -U platformio
cp ./platformio_override_sample.ini ./platformio_override.ini
- name: Download safeboot firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
2024-02-29 15:33:37 +00:00
- name: Add "release" to footer
run: |
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
2021-12-12 16:15:43 +00:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2021-12-12 16:15:43 +00:00
with:
name: firmware
path: ./build_output
language-images:
needs: safeboot-images
2021-12-12 16:15:43 +00:00
runs-on: ubuntu-latest
2021-12-12 16:21:31 +00:00
if: github.repository == 'arendst/Tasmota'
2021-12-12 16:15:43 +00:00
continue-on-error: true
strategy:
matrix:
variant: [ tasmota, tasmota32 ]
2022-08-07 10:33:32 +01:00
language: [ AD, AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
2021-12-12 16:15:43 +00:00
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
2021-12-12 22:36:46 +00:00
with:
ref: master
2021-12-12 16:15:43 +00:00
- name: Set up Python
2024-01-28 18:05:20 +00:00
uses: actions/setup-python@v5
2022-10-25 10:41:21 +01:00
with:
python-version: '3.x'
2021-12-12 16:15:43 +00:00
- name: Install dependencies
run: |
2022-09-18 12:32:48 +01:00
pip install wheel
pip install -U platformio
cp ./platformio_override_sample.ini ./platformio_override.ini
- name: Download safeboot firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
2024-02-29 15:33:37 +00:00
- name: Add "release" to footer
run: |
sed -i -e "s/TASMOTA_SHA_SHORT/TASMOTA_SHA_SHORT release-/g" ./tasmota/include/tasmota_version.h
2021-12-12 16:15:43 +00:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- name: Upload language firmware artifacts
2024-01-28 18:05:20 +00:00
uses: jason2866/upload-artifact@v2.0.3
2021-12-12 16:15:43 +00:00
with:
name: firmware
path: ./build_output
2020-12-23 16:10:10 +00:00
2023-05-23 15:55:19 +01:00
Release:
2022-12-16 11:00:33 +00:00
needs: [base-images, base32-images, language-images]
2020-12-23 16:10:10 +00:00
runs-on: ubuntu-latest
continue-on-error: true
steps:
2024-01-28 18:05:20 +00:00
- uses: actions/checkout@v4
- name: Download Tasmota firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
2020-12-23 16:10:10 +00:00
with:
name: firmware
path: ./mv_firmware
- name: Download safeboot firmwares
2024-01-28 18:05:20 +00:00
uses: jason2866/download-artifact@v3.0.4
with:
name: firmware_safeboot
path: ./mv_firmware
2020-12-23 16:10:10 +00:00
- name: Display structure of downloaded files
run: ls -R ./mv_firmware/
- name: Zip all map.gz files in one file -> map_all.zip
run: 7z a -mx=9 -tzip -xr'!.*' map_all.zip mv_firmware/map
- name: Release
uses: jason2866/action-gh-release@v1.2
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.run_number }}
files: |
./mv_firmware/firmware/*
map_all.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2021-07-29 21:59:25 +01:00
2021-11-29 10:29:38 +00:00
Start_final_copy:
2023-05-23 16:08:21 +01:00
needs: Release
2021-11-29 10:29:38 +00:00
runs-on: ubuntu-latest
steps:
2023-05-23 15:55:19 +01:00
- name: Dispatch workflow in arendst/Tasmota-firmware
2021-08-28 15:57:43 +01:00
run: |
2023-05-23 15:55:19 +01:00
curl -X POST https://api.github.com/repos/arendst/Tasmota-firmware/actions/workflows/fetch_deploy.yml/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.API_TOKEN_GITHUB }} \
2023-05-24 18:43:53 +01:00
--data '{"ref": "gh_actions"}'