Skip to content

Commit

Permalink
Merge pull request #4 from redmushie/feature/release-body
Browse files Browse the repository at this point in the history
Add RELEASE.md as default release body
  • Loading branch information
redmushie authored Sep 19, 2023
2 parents 1ecf1c3 + 42ef272 commit c7ea03a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,24 @@ jobs:
- name: Build PlatformIO Project
run: pio run

# This step reads a file from repo and use it for body of the release
# This works on any self-hosted runner OS
- name: Read RELEASE.md
id: read_release
shell: bash
run: |
r=$(cat RELEASE.md) # <--- Read release.md (Provide correct path as per your repo)
r="${r//'%'/'%25'}" # Multiline escape sequences for %
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n'
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r'
echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT # <--- Set environment variable
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: .pio/build/ShockLink/firmware.bin
asset_name: ShockLink.bin
tag: ${{ github.ref }}
body: |
${{ steps.read_release.outputs.RELEASE_BODY }} # <--- Use environment variables that was created earlier
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ShockLink Firmware

Download `ShockLink.bin` and flash it to your microcontroller.

0 comments on commit c7ea03a

Please sign in to comment.