Skip to content

Commit 5610bce

Browse files
authored
Merge pull request #13 from rene-d/develop
mise en place CD
2 parents 52cc4d5 + f069c11 commit 5610bce

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

.github/workflows/platformio.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
- uses: actions/checkout@v1
1717
- name: Set up Python
1818
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.8
1921

2022
- name: Install dependencies
2123
run: |

.github/workflows/release.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Upload Release Asset
8+
9+
jobs:
10+
build:
11+
name: Upload Release Asset
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v1
22+
with:
23+
python-version: 3.8
24+
25+
- name: Build project # This would actually build your project, using zip for an example artifact
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install platformio
29+
30+
platformio run -e esp01s_prod -e esp12e_prod
31+
platformio run -e esp01s_prod -e esp12e_prod -t buildfs
32+
33+
cd .pio/build
34+
zip --junk-paths ../../wifinfo-esp01_1m.zip esp01s_prod/*.bin
35+
zip --junk-paths ../../wifinfo-esp12e.zip esp12e_prod/*.bin
36+
37+
- name: Create Release
38+
id: create_release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tag_name: ${{ github.ref }}
44+
release_name: Release ${{ github.ref }}
45+
draft: false
46+
prerelease: false
47+
48+
- name: Upload Release Asset 1
49+
id: upload-release-asset-1
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
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
55+
asset_path: ./wifinfo-esp01_1m.zip
56+
asset_name: wifinfo-esp01_1m.zip
57+
asset_content_type: application/zip
58+
59+
- name: Upload Release Asset 2
60+
id: upload-release-asset-2
61+
uses: actions/upload-release-asset@v1
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
with:
65+
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
66+
asset_path: ./wifinfo-esp12e.zip
67+
asset_name: wifinfo-esp12e.zip
68+
asset_content_type: application/zip

platformio.ini

+9
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ monitor_speed = 1200
5555
src_build_flags = -DLED_BUILTIN=2
5656
lib_deps = SimpleCLI
5757
extra_scripts = post:prep_data_folder.py
58+
59+
; nodeMCU ou similaire
60+
[env:esp12e_prod]
61+
platform = espressif8266
62+
board = esp12e
63+
framework = arduino
64+
monitor_speed = 1200
65+
lib_deps = SimpleCLI
66+
extra_scripts = post:prep_data_folder.py

0 commit comments

Comments
 (0)