Last active
December 24, 2019 04:46
-
-
Save ctalkington/561885d943cdf1fb5a43961cad21955d to your computer and use it in GitHub Desktop.
WLED GH Actions WIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PLATFORMIO_CI_SRC: wled00 | |
WLED_VERSION: 1.9.0-beta+sha.${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.platformio | |
key: ${{ runner.os }}-platformio-${{ hashFiles('**/platformio.ini') }} | |
restore-keys: | | |
${{ runner.os }}-platformio | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: '2.7.x' | |
- name: Install Platform IO | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U platformio | |
platformio update | |
- name: Compile Binaries | |
run: | | |
platformio ci --project-conf=./platformio.ini --build-dir=./build --keep-build-dir | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ env.WLED_VERSION }} | |
release_name: Automated Build ${{ github.sha }} | |
draft: false | |
prerelease: true | |
- name: Upload Release Asset nodemcuv2 | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/.pio/build/nodemcuv2/firmware.bin | |
asset_name: wled-${{ env.WLED_VERSION }}-nodemcuv2.bin | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset d1_mini | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/.pio/build/d1_mini/firmware.bin | |
asset_name: wled-${{ env.WLED_VERSION }}-d1_mini.bin | |
asset_content_type: application/octet-stream | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment