2021-07-29 21:59:25 +01:00
|
|
|
name: Build_firmware_master
|
2020-12-23 16:10:10 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: master
|
2021-07-29 21:59:25 +01:00
|
|
|
paths-ignore:
|
|
|
|
- '.github/**' # Ignore changes towards the .github directory
|
2021-12-12 16:15:43 +00:00
|
|
|
- '**.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:
|
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
|
2022-03-08 10:13:22 +00:00
|
|
|
- tasmota4M
|
2021-12-12 16:15:43 +00:00
|
|
|
- tasmota-minimal
|
|
|
|
- tasmota-display
|
|
|
|
- tasmota-ir
|
|
|
|
- tasmota-knx
|
|
|
|
- tasmota-lite
|
|
|
|
- tasmota-sensors
|
|
|
|
- tasmota-zbbridge
|
|
|
|
- tasmota-zigbee
|
|
|
|
- tasmota32
|
|
|
|
- tasmota32-webcam
|
|
|
|
- tasmota32-bluetooth
|
|
|
|
- tasmota32-display
|
|
|
|
- tasmota32-ir
|
|
|
|
- tasmota32-lvgl
|
|
|
|
- tasmota32c3
|
|
|
|
- tasmota32solo1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-12-12 22:36:46 +00:00
|
|
|
with:
|
|
|
|
ref: master
|
2021-12-12 16:15:43 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pip install -U platformio
|
|
|
|
- name: Run PlatformIO
|
|
|
|
run: platformio run -e ${{ matrix.variant }}
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: firmware
|
|
|
|
path: ./build_output
|
|
|
|
|
|
|
|
language-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, tasmota32 ]
|
|
|
|
language: [ 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 ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-12-12 22:36:46 +00:00
|
|
|
with:
|
|
|
|
ref: master
|
2021-12-12 16:15:43 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
pip install -U platformio
|
|
|
|
- name: Run PlatformIO
|
|
|
|
run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: firmware
|
|
|
|
path: ./build_output
|
2020-12-23 16:10:10 +00:00
|
|
|
|
|
|
|
Upload:
|
2021-12-12 16:15:43 +00:00
|
|
|
needs: [base-images, language-images]
|
2020-12-23 16:10:10 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
2021-07-29 21:59:25 +01:00
|
|
|
- uses: actions/checkout@v2
|
2020-12-23 16:10:10 +00:00
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: firmware
|
|
|
|
path: ./mv_firmware
|
|
|
|
- name: Display structure of downloaded files
|
2021-05-01 15:21:46 +01:00
|
|
|
run: ls -R ./mv_firmware/
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
#if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.run_number }}
|
|
|
|
files: ./mv_firmware/firmware/*
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-29 21:59:25 +01:00
|
|
|
|
2020-12-23 16:10:10 +00:00
|
|
|
- name: Move firmware files in sub-folders
|
|
|
|
run: |
|
2021-08-08 14:02:51 +01:00
|
|
|
mkdir -p ./release-firmware/tasmota/languages
|
|
|
|
mkdir -p ./release-firmware/tasmota32/languages
|
|
|
|
mkdir -p ./release-firmware/map
|
|
|
|
[ ! -f ./mv_firmware/map/* ] || mv ./mv_firmware/map/* ./release-firmware/map/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota.* ] || mv ./mv_firmware/firmware/tasmota.* ./release-firmware/tasmota/
|
2022-03-09 10:03:21 +00:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota4M.* ] || mv ./mv_firmware/firmware/tasmota4M.* ./release-firmware/tasmota/
|
2021-08-08 14:02:51 +01:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-sensors.* ] || mv ./mv_firmware/firmware/tasmota-sensors.* ./release-firmware/tasmota/
|
2021-12-21 11:39:19 +00:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-minimal.bin.gz ] || mv ./mv_firmware/firmware/tasmota-minimal.bin.gz ./release-firmware/tasmota/
|
2021-08-08 14:02:51 +01:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-lite.* ] || mv ./mv_firmware/firmware/tasmota-lite.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-ir*.* ] || mv ./mv_firmware/firmware/tasmota-ir*.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-display.* ] || mv ./mv_firmware/firmware/tasmota-display.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-knx.* ] || mv ./mv_firmware/firmware/tasmota-knx.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-zbbridge.* ] || mv ./mv_firmware/firmware/tasmota-zbbridge.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota-zigbee.* ] || mv ./mv_firmware/firmware/tasmota-zigbee.* ./release-firmware/tasmota/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32.* ] || mv ./mv_firmware/firmware/tasmota32.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32solo1*.* ] || mv ./mv_firmware/firmware/tasmota32solo1*.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-ir*.* ] || mv ./mv_firmware/firmware/tasmota32-ir*.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-display.* ] || mv ./mv_firmware/firmware/tasmota32-display.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-lvgl.* ] || mv ./mv_firmware/firmware/tasmota32-lvgl.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-web*.* ] || mv ./mv_firmware/firmware/tasmota32-web*.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-odroidgo.* ] || mv ./mv_firmware/firmware/tasmota32-odroidgo.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-core2.* ] || mv ./mv_firmware/firmware/tasmota32-core2.* ./release-firmware/tasmota32/
|
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32-bluetooth.* ] || mv ./mv_firmware/firmware/tasmota32-bluetooth.* ./release-firmware/tasmota32/
|
2021-10-13 10:20:03 +01:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32c3*.* ] || mv ./mv_firmware/firmware/tasmota32c3*.* ./release-firmware/tasmota32/
|
2021-08-08 14:02:51 +01:00
|
|
|
[ ! -f ./mv_firmware/firmware/tasmota32* ] || mv ./mv_firmware/firmware/tasmota32* ./release-firmware/tasmota32/languages/
|
|
|
|
[ ! -f ./mv_firmware/firmware/* ] || mv ./mv_firmware/firmware/* ./release-firmware/tasmota/languages/
|
2021-11-29 10:29:38 +00:00
|
|
|
- name: Display files to transfer
|
2021-08-08 13:46:37 +01:00
|
|
|
run: ls -R ./*
|
2021-11-29 10:29:38 +00:00
|
|
|
- name: Push Firmware files to tmp_copy repo
|
2021-10-13 19:37:24 +01:00
|
|
|
uses: Jason2866/copy_file_to_another_repo_action@main
|
2021-08-08 13:46:37 +01:00
|
|
|
env:
|
|
|
|
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
2020-12-23 16:10:10 +00:00
|
|
|
with:
|
2021-08-08 14:02:51 +01:00
|
|
|
source_file: 'release-firmware'
|
2021-11-29 10:29:38 +00:00
|
|
|
destination_repo: 'arendst/tmp_copy'
|
|
|
|
destination_branch: 'firmware'
|
2021-08-08 13:46:37 +01:00
|
|
|
user_email: 'github-actions@github.com'
|
|
|
|
user_name: 'github-actions'
|
2021-11-29 10:29:38 +00:00
|
|
|
|
|
|
|
Start_final_copy:
|
|
|
|
needs: Upload
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-08-28 15:57:43 +01:00
|
|
|
- name: Creat trigger.txt
|
|
|
|
run: |
|
|
|
|
echo ${GITHUB_SHA} &> trigger.txt
|
|
|
|
echo "$(<trigger.txt)"
|
2021-11-29 10:29:38 +00:00
|
|
|
- name: Push trigger.txt to start workflow copy in tmp repo
|
2021-10-13 19:37:24 +01:00
|
|
|
uses: Jason2866/copy_file_to_another_repo_action@main
|
2021-08-28 15:57:43 +01:00
|
|
|
env:
|
|
|
|
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
|
|
|
with:
|
|
|
|
source_file: 'trigger.txt'
|
2021-11-29 10:29:38 +00:00
|
|
|
destination_repo: 'arendst/tmp_copy'
|
2021-08-28 15:57:43 +01:00
|
|
|
destination_branch: 'action-master'
|
|
|
|
user_email: 'github-actions@github.com'
|
|
|
|
user_name: 'github-actions'
|