Tasmota/.github/workflows/Tasmota_build_master.yml

218 lines
6.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:
- tasmota32solo1-safeboot
- tasmota32-safeboot
- tasmota32c3-safeboot
- tasmota32c3cdc-safeboot
- tasmota32s2-safeboot
- tasmota32s2cdc-safeboot
- tasmota32s3-safeboot
- tasmota32s3cdc-safeboot
steps:
- uses: actions/checkout@v3
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload safeboot firmware artifacts
uses: actions/upload-artifact@v3
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:
- uses: actions/checkout@v3
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install wheel
pip install -U platformio
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
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
- tasmota32c3
2022-06-07 15:37:10 +01:00
- tasmota32c3cdc
2022-05-21 14:14:17 +01:00
- tasmota32s2
2022-06-07 15:37:10 +01:00
- tasmota32s2cdc
2022-05-21 14:14:17 +01:00
- tasmota32s3
2022-06-07 15:37:10 +01:00
- tasmota32s3cdc
2021-12-12 16:15:43 +00:00
- tasmota32solo1
steps:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
2021-12-12 22:36:46 +00:00
with:
ref: master
2021-12-12 16:15:43 +00:00
- name: Set up Python
2022-10-24 14:06:05 +01:00
uses: actions/setup-python@v4
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
2021-12-12 16:15:43 +00:00
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
2021-12-12 16:15:43 +00:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}
- name: Upload firmware artifacts
uses: actions/upload-artifact@v3
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:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
2021-12-12 22:36:46 +00:00
with:
ref: master
2021-12-12 16:15:43 +00:00
- name: Set up Python
2022-10-24 14:06:05 +01:00
uses: actions/setup-python@v4
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
2021-12-12 16:15:43 +00:00
pip install -U platformio
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
with:
name: firmware_safeboot
path: ./firmware
- name: Display downloaded files
run: |
ls -R ./firmware/
2021-12-12 16:15:43 +00:00
- name: Run PlatformIO
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
- name: Upload language firmware artifacts
uses: actions/upload-artifact@v3
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:
2022-05-05 17:24:12 +01:00
- uses: actions/checkout@v3
- name: Download Tasmota firmwares
uses: actions/download-artifact@v3
2020-12-23 16:10:10 +00:00
with:
name: firmware
path: ./mv_firmware
- name: Download safeboot firmwares
uses: actions/download-artifact@v3
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"}'