mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-22 18:56:34 +00:00
Add release workflow
This commit is contained in:
parent
d97d67a498
commit
1b5f840201
59
.github/workflows/release.yml
vendored
Normal file
59
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
name: Create Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pip-
|
||||||
|
- name: Cache PlatformIO
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.platformio
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
- name: Install PlatformIO
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --upgrade platformio
|
||||||
|
- name: Enable ESP platforms from platformio_override-template.ini
|
||||||
|
run: |
|
||||||
|
sed 's/; user_setups\/esp/user_setups\/esp/g' platformio_override-template.ini > platformio_override.ini
|
||||||
|
- name: List all files in current folder
|
||||||
|
run: |
|
||||||
|
ls -la
|
||||||
|
- name: Cat platformio_override.ini
|
||||||
|
run: |
|
||||||
|
cat platformio_override.ini
|
||||||
|
- name: Run PlatformIO
|
||||||
|
run: pio run -e d1-mini-esp32_ili9341 -e d1-mini-esp8266_ili9341
|
||||||
|
- name: Upload output file
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: hasp-lvgl firmware.zip
|
||||||
|
path: build_output/firmware/*.bin
|
||||||
|
- name: Create release and upload firmware
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
assets=()
|
||||||
|
for asset in build_output/firmware/*.bin; do
|
||||||
|
assets+=("-a" "$asset")
|
||||||
|
done
|
||||||
|
tag_name="${GITHUB_REF##*/}"
|
||||||
|
hub release edit "${assets[@]}" -m "$tag_name" "$tag_name"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user