Skip to content

Commit

Permalink
github workflow release
Browse files Browse the repository at this point in the history
  • Loading branch information
universam1 committed Jun 29, 2021
1 parent 089d678 commit 2e87537
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- uses: DoozyX/[email protected]
with:
source: './pio/src'
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
with:
fetch-depth: '0'
- name: Get versionname
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
tags:
- '*'

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
with:
fetch-depth: '0'
- name: Get versionname
id: get-ver
run: |
echo ::set-output name=ver_name::$(git describe --tags)
- name: Print version
run: |
echo ${{ steps.get-ver.outputs.ver_name }}
- 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: Install library dependencies
run: pio lib -g install 1
- name: Run PlatformIO
run: pio run -e d1_mini_git
- name: Save firmware
uses: actions/upload-artifact@v2
with:
name: firmware
path: .pio/build/d1_mini_git/firmware.bin
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
.pio/build/d1_mini_git/firmware.bin
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

18 changes: 10 additions & 8 deletions pio/src/iSpindel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,13 @@ bool uploadData(uint8_t service)
{
CONSOLELN(F("adding BRICKS params"));

if (my_token[0] != 0) {
if (my_token[0] != 0)
{
CONSOLELN(F("found token"));
sender.add("apikey", my_token); // use the token field as vessel for the api key
}
else {
else
{
CONSOLELN(F("missing token in params"));
}

Expand All @@ -804,7 +806,7 @@ bool uploadData(uint8_t service)
sender.add("chipid", chipidHashed);
sender.add("s_number_wort_0", (float)(round(Gravity * 10) / 10));
sender.add("s_number_temp_0", (float)(round(Temperatur * 10) / 10)); // always transmit °C
sender.add("s_number_voltage_0", (float)round(Volt * 100 ) / 100 );
sender.add("s_number_voltage_0", (float)round(Volt * 100) / 100);
sender.add("s_number_wifi_0", WiFi.RSSI());
sender.add("s_number_tilt_0", (float)(round(Tilt * 100) / 100));

Expand Down Expand Up @@ -1254,11 +1256,11 @@ void setup()
initDS18B20();
initAccel();

#ifdef WIFI_IS_OFF_AT_BOOT
// persistence is disabled by default and WiFi does not start automatically at boot
// source: https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/generic-class.html#persistent
enableWiFiAtBootTime();
#endif
#ifdef WIFI_IS_OFF_AT_BOOT
// persistence is disabled by default and WiFi does not start automatically at boot
// source: https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/generic-class.html#persistent
enableWiFiAtBootTime();
#endif

// decide whether we want configuration mode or normal mode
if (shouldStartConfig(validConf))
Expand Down

0 comments on commit 2e87537

Please sign in to comment.