Skip to content

Commit

Permalink
Merge pull request #13 from rene-d/develop
Browse files Browse the repository at this point in the history
mise en place CD
  • Loading branch information
rene-d authored Feb 27, 2020
2 parents 52cc4d5 + f069c11 commit 5610bce
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/platformio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Upload Release Asset

jobs:
build:
name: Upload Release Asset

runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Build project # This would actually build your project, using zip for an example artifact
run: |
python -m pip install --upgrade pip
pip install platformio
platformio run -e esp01s_prod -e esp12e_prod
platformio run -e esp01s_prod -e esp12e_prod -t buildfs
cd .pio/build
zip --junk-paths ../../wifinfo-esp01_1m.zip esp01s_prod/*.bin
zip --junk-paths ../../wifinfo-esp12e.zip esp12e_prod/*.bin
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset 1
id: upload-release-asset-1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./wifinfo-esp01_1m.zip
asset_name: wifinfo-esp01_1m.zip
asset_content_type: application/zip

- name: Upload Release Asset 2
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./wifinfo-esp12e.zip
asset_name: wifinfo-esp12e.zip
asset_content_type: application/zip
9 changes: 9 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@ monitor_speed = 1200
src_build_flags = -DLED_BUILTIN=2
lib_deps = SimpleCLI
extra_scripts = post:prep_data_folder.py

; nodeMCU ou similaire
[env:esp12e_prod]
platform = espressif8266
board = esp12e
framework = arduino
monitor_speed = 1200
lib_deps = SimpleCLI
extra_scripts = post:prep_data_folder.py

0 comments on commit 5610bce

Please sign in to comment.