diff --git a/.github/RELEASE_TEMPLATE.md b/.github/RELEASE_TEMPLATE.md new file mode 100644 index 00000000..ef36c69a --- /dev/null +++ b/.github/RELEASE_TEMPLATE.md @@ -0,0 +1,31 @@ +## 主要变更 + +> 稍后补充 + +## 下载链接 + +| PCB 版本 / 格式 | BIN | HEX | UF2 | +| -------- | --- | --- | --- | +| 键盘 @ V1.1 | [hw75_keyboard@1.1-zmk.bin] | [hw75_keyboard@1.1-zmk.hex] | [hw75_keyboard@1.1-zmk.uf2] | +| 键盘 @ V1.2 | [hw75_keyboard@1.2-zmk.bin] | [hw75_keyboard@1.2-zmk.hex] | [hw75_keyboard@1.2-zmk.uf2] | +| 扩展 | [hw75_dynamic-zmk.bin] | [hw75_dynamic-zmk.hex] | [hw75_dynamic-zmk.uf2] | + +## 重要提醒 + +1. 键盘和扩展皆支持通过上位机调整参数,请阅读[上位机驱动]了解详情; +2. 请根据 Bootloader 选择对应的固件格式,详见 [Bootloader]; +3. 请注意区分 PCB 版本,详见[固件更新 (键盘)]。 + +[hw75_keyboard@1.1-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.1-zmk.bin +[hw75_keyboard@1.1-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.1-zmk.hex +[hw75_keyboard@1.1-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.1-zmk.uf2 +[hw75_keyboard@1.2-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.2-zmk.bin +[hw75_keyboard@1.2-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.2-zmk.hex +[hw75_keyboard@1.2-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_keyboard@1.2-zmk.uf2 +[hw75_dynamic-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_dynamic-zmk.bin +[hw75_dynamic-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_dynamic-zmk.hex +[hw75_dynamic-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/hw75_dynamic-zmk.uf2 + +[上位机驱动]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/%E4%B8%8A%E4%BD%8D%E6%9C%BA%E9%A9%B1%E5%8A%A8 +[Bootloader]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/Bootloader +[固件更新 (键盘)]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/%E5%9B%BA%E4%BB%B6%E6%9B%B4%E6%96%B0-(%E9%94%AE%E7%9B%98) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d3dcebe..6d94fb70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,12 +90,23 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Download artifacts uses: actions/download-artifact@v3 with: name: firmware path: firmware + - name: Prepare release notes + id: release + run: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "RELEASE_BODY<<$EOF" >> $GITHUB_OUTPUT + sed 's/{{TAG}}/${{ github.ref_name }}/g' .github/RELEASE_TEMPLATE.md >> $GITHUB_OUTPUT + echo "$EOF" >> $GITHUB_OUTPUT + - name: Publish release uses: svenstaro/upload-release-action@v2 with: @@ -103,3 +114,6 @@ jobs: file_glob: true tag: ${{ github.ref }} repo_token: ${{ secrets.GITHUB_TOKEN }} + body: | + ${{ steps.release.outputs.RELEASE_BODY }} + prerelease: true diff --git a/GITHUB_OUTPUT b/GITHUB_OUTPUT new file mode 100644 index 00000000..fe594358 --- /dev/null +++ b/GITHUB_OUTPUT @@ -0,0 +1,31 @@ +RELEASE_BODY="## 主要变更 + +> 稍后补充 + +## 下载链接 + +| PCB 版本 / 格式 | BIN | HEX | UF2 | +| -------- | --- | --- | --- | +| 键盘 @ V1.1 | [hw75_keyboard@1.1-zmk.bin] | [hw75_keyboard@1.1-zmk.hex] | [hw75_keyboard@1.1-zmk.uf2] | +| 键盘 @ V1.2 | [hw75_keyboard@1.2-zmk.bin] | [hw75_keyboard@1.2-zmk.hex] | [hw75_keyboard@1.2-zmk.uf2] | +| 扩展 | [hw75_dynamic-zmk.bin] | [hw75_dynamic-zmk.hex] | [hw75_dynamic-zmk.uf2] | + +## 重要提醒 + +1. 键盘和扩展皆支持通过上位机调整参数,请阅读[上位机驱动]了解详情; +2. 请根据 Bootloader 选择对应的固件格式,详见 [Bootloader]; +3. 请注意区分 PCB 版本,详见[固件更新 (键盘)]。 + +[hw75_keyboard@1.1-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.1-zmk.bin +[hw75_keyboard@1.1-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.1-zmk.hex +[hw75_keyboard@1.1-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.1-zmk.uf2 +[hw75_keyboard@1.2-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.2-zmk.bin +[hw75_keyboard@1.2-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.2-zmk.hex +[hw75_keyboard@1.2-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_keyboard@1.2-zmk.uf2 +[hw75_dynamic-zmk.bin]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_dynamic-zmk.bin +[hw75_dynamic-zmk.hex]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_dynamic-zmk.hex +[hw75_dynamic-zmk.uf2]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/hw75_dynamic-zmk.uf2 + +[上位机驱动]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/%E4%B8%8A%E4%BD%8D%E6%9C%BA%E9%A9%B1%E5%8A%A8 +[Bootloader]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/Bootloader +[固件更新 (键盘)]: https://github.com/xingrz/zmk-config_helloword_hw-75/wiki/%E5%9B%BA%E4%BB%B6%E6%9B%B4%E6%96%B0-(%E9%94%AE%E7%9B%98)"