Skip to content

Commit cb137ee

Browse files
committed
Merge remote-tracking branch 'origin/master' into dev_3.0
2 parents 18af8ed + 7abb254 commit cb137ee

File tree

3 files changed

+76
-2
lines changed

3 files changed

+76
-2
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore
3+
.github export-ignore

.github/workflows/deploy.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: auto-deploy
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
archive-file:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: get version
12+
id: version
13+
uses: notiz-dev/github-action-json-property@release
14+
with:
15+
path: 'library.json'
16+
prop_path: 'version'
17+
18+
- name: get current time
19+
uses: 1466587594/get-current-time@v2
20+
id: current-time
21+
with:
22+
format: YYYY.MM.DD
23+
utcOffset: "+08:00"
24+
25+
# - name: install-zip
26+
# uses: montudor/action-zip@v1
27+
28+
# - name: Zip output
29+
# run: zip -qq -r blinker-library-${{steps.version.outputs.prop}}.zip ../blinker-library -x .github/* -x .git/*
30+
# working-directory: ${{ github.workspace }}
31+
32+
# - name: Archive Release
33+
# uses: thedoctor0/zip-release@0.7.2
34+
# with:
35+
# type: 'zip'
36+
# filename: 'blinker-library-${{steps.version.outputs.prop}}.zip'
37+
# directory: '${{ github.workspace }}'
38+
# path: '../'
39+
40+
- name: download zip
41+
uses: carlosperate/download-file-action@v2.0.0
42+
with:
43+
file-url: 'https://api.github.com/repos/blinker-iot/blinker-library/zipball'
44+
file-name: 'blinker-library-${{steps.version.outputs.prop}}.zip'
45+
46+
- name: create json
47+
id: jsonfile
48+
uses: jsdaniell/create-json@1.1.2
49+
with:
50+
name: "arduino.json"
51+
json: '{"img": "assets/sdk/arduino.png", "text": "Arduino (C++)", "update": "${{ steps.current-time.outputs.formattedTime}}", "version": "${{steps.version.outputs.prop}}", "github": "https://github.com/blinker-iot/blinker-library", "document": "https://diandeng.tech/doc/arduino-support", "download": "sdk/blinker-library-${{steps.version.outputs.prop}}.zip" }'
52+
53+
- name: upload zip
54+
uses: garygrossgarten/github-action-scp@v0.5.3
55+
with:
56+
local: blinker-library-${{steps.version.outputs.prop}}.zip
57+
remote: ${{ secrets.REMOTE_PATH }}/blinker-library-${{steps.version.outputs.prop}}.zip
58+
host: ${{ secrets.SERVER_IP }}
59+
username: ubuntu
60+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
61+
recursive: true
62+
63+
- name: upload json
64+
uses: garygrossgarten/github-action-scp@v0.5.3
65+
with:
66+
local: arduino.json
67+
remote: ${{ secrets.REMOTE_PATH }}/arduino.json
68+
host: ${{ secrets.SERVER_IP }}
69+
username: ubuntu
70+
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
71+
recursive: true

examples/Blinker_Voice_Assistant/Blinker_MIOT/MIOT_LIGHT/MIOT_LIGHT.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void miotPowerState(const String & state)
123123

124124
wsState = false;
125125

126-
colorW == 0;
126+
colorW = 0;
127127
}
128128

129129
pixelShow();
@@ -305,4 +305,4 @@ void loop()
305305
pixels.setPixelColor(i, colorR, colorG, colorB);
306306
}
307307
pixels.show();
308-
}
308+
}

0 commit comments

Comments
 (0)