diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03333959..84959fbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,31 +107,43 @@ jobs: .pio/build/${{ matrix.environment }}/bootloader.bin .pio/build/${{ matrix.environment }}/boot_app0.bin - - uses: actions/upload-artifact@v3 - if: startsWith(github.ref, 'refs/tags/') - with: - name: opendtu-release - path: | - .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin - .pio/build/${{ matrix.environment }}/partitions.bin - .pio/build/${{ matrix.environment }}/bootloader_dio_40m.bin - .pio/build/${{ matrix.environment }}/boot_app0.bin - release: name: Create Release runs-on: ubuntu-latest needs: [get_default_envs, build] if: startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/download-artifact@v3 - with: - name: opendtu-release + - name: Checkout + uses: actions/checkout@v3 - - name: Create draft release - uses: softprops/action-gh-release@v1 + - name: Build Changelog + id: github_release + uses: mikepenz/release-changelog-builder-action@v3.7.0 with: - draft: True - files: | - *.bin + failOnError: true + commitMode: true + configuration: ".github/workflows/config/release-notes-config.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/download-artifact@v3 + with: + path: artifacts/ + + - name: Create ZIPs + run: | + ls -R + sudo apt install zip + cd artifacts + for i in */; do zip -r "${i%/}.zip" "$i"; done + for i in */; do cp ${i}opendtu-*.bin ./; done + + - name: Create release + uses: softprops/action-gh-release@v1 + with: + body: ${{steps.github_release.outputs.changelog}} + draft: False + files: | + artifacts/*.zip, artifacts/*.bin env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/config/release-notes-config.json b/.github/workflows/config/release-notes-config.json new file mode 100644 index 00000000..b28e1ce3 --- /dev/null +++ b/.github/workflows/config/release-notes-config.json @@ -0,0 +1,44 @@ +{ + "categories": [ + { + "title": "## ⚡ Breaking Changes", + "labels": [ + "breaking change" + ] + }, + { + "title": "## 🚀 Features", + "labels": [ + "feature" + ] + }, + { + "title": "## 🐛 Fixes", + "labels": [ + "fix" + ] + }, + { + "title": "## 📚 Documentation", + "labels": [ + "doc" + ] + }, + { + "title": "## 🛠 Under the hood", + "labels": [] + } + ], + "template": "${{CHANGELOG}}", + "pr_template": "- [${{TITLE}}](https://github.com/tbnobody/OpenDTU/commit/${{MERGE_SHA}})", + "empty_template": "- no changes", + "label_extractor": [ + { + "pattern": "(.): (.+)", + "target": "$1" + } + ], + "tag_resolver": { + "method": "sort" + } +} diff --git a/.github/workflows/cpplint.yml b/.github/workflows/cpplint.yml index 5a44695e..0514bb81 100644 --- a/.github/workflows/cpplint.yml +++ b/.github/workflows/cpplint.yml @@ -18,4 +18,4 @@ jobs: pip install cpplint - name: Linting run: | - cpplint --repository=. --recursive --filter=-runtime/references,-readability/braces,-whitespace,-legal,-build/include ./src ./include ./lib/Hoymiles + cpplint --repository=. --recursive --filter=-runtime/references,-readability/braces,-whitespace,-legal,-build/include ./src ./include ./lib/Hoymiles ./lib/MqttSubscribeParser ./lib/TimeoutHelper ./lib/ResetReason diff --git a/.github/workflows/yarnlint.yml b/.github/workflows/yarnlint.yml new file mode 100644 index 00000000..f1c912c9 --- /dev/null +++ b/.github/workflows/yarnlint.yml @@ -0,0 +1,22 @@ +name: Yarn Linting + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js and yarn + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "yarn" + cache-dependency-path: "webapp/yarn.lock" + + - name: Install WebApp dependencies + run: yarn --cwd webapp install --frozen-lockfile + + - name: Linting + run: yarn --cwd webapp lint \ No newline at end of file diff --git a/README.md b/README.md index 695c9091..fb370f12 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ This project is still under development and adds following features: [](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml) [](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml) +[](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml) ## !! IMPORTANT UPGRADE NOTES !! diff --git a/platformio.ini b/platformio.ini index fb930293..c5cbca08 100644 --- a/platformio.ini +++ b/platformio.ini @@ -96,7 +96,7 @@ build_flags = ${env.build_flags} -DOPENDTU_ETHERNET -[env:d1 mini esp32] +[env:d1_mini_esp32] board = wemos_d1_mini32 build_flags = ${env.build_flags} diff --git a/src/main.cpp b/src/main.cpp index 2ced1bd1..4d1dad57 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -143,6 +143,7 @@ void setup() Configuration.write(); } MessageOutput.println("done"); + MessageOutput.println("done"); InverterSettings.init(); diff --git a/webapp/src/components/FirmwareInfo.vue b/webapp/src/components/FirmwareInfo.vue index 7a127c10..9eda8935 100644 --- a/webapp/src/components/FirmwareInfo.vue +++ b/webapp/src/components/FirmwareInfo.vue @@ -17,9 +17,9 @@