Skip to content

Commit

Permalink
github: Attach release body from template
Browse files Browse the repository at this point in the history
  • Loading branch information
xingrz committed Apr 14, 2023
1 parent ded2805 commit 76380cf
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## 主要变更

> 稍后补充
## 下载链接

| PCB 版本 / 格式 | BIN | HEX | UF2 |
| -------- | --- | --- | --- |
| 键盘 @ V1.1 | [[email protected]] | [[email protected]] | [[email protected]2] |
| 键盘 @ V1.2 | [[email protected]] | [[email protected]] | [[email protected]2] |
| 扩展 | [hw75_dynamic-zmk.bin] | [hw75_dynamic-zmk.hex] | [hw75_dynamic-zmk.uf2] |

## 重要提醒

1. 键盘和扩展皆支持通过上位机调整参数,请阅读[上位机驱动]了解详情;
2. 请根据 Bootloader 选择对应的固件格式,详见 [Bootloader]
3. 请注意区分 PCB 版本,详见[固件更新 (键盘)]

[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/{{TAG}}/[email protected]
[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)
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,30 @@ 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:
file: firmware/*
file_glob: true
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
body: |
${{ steps.release.outputs.RELEASE_BODY }}
prerelease: true
31 changes: 31 additions & 0 deletions GITHUB_OUTPUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
RELEASE_BODY="## 主要变更

> 稍后补充

## 下载链接

| PCB 版本 / 格式 | BIN | HEX | UF2 |
| -------- | --- | --- | --- |
| 键盘 @ V1.1 | [[email protected]] | [[email protected]] | [[email protected]] |
| 键盘 @ V1.2 | [[email protected]] | [[email protected]] | [[email protected]] |
| 扩展 | [hw75_dynamic-zmk.bin] | [hw75_dynamic-zmk.hex] | [hw75_dynamic-zmk.uf2] |

## 重要提醒

1. 键盘和扩展皆支持通过上位机调整参数,请阅读[上位机驱动]了解详情;
2. 请根据 Bootloader 选择对应的固件格式,详见 [Bootloader];
3. 请注意区分 PCB 版本,详见[固件更新 (键盘)]。

[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[[email protected]]: https://github.com/xingrz/zmk-config_helloword_hw-75/releases/download/20230414.1/[email protected]
[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)"

0 comments on commit 76380cf

Please sign in to comment.