Skip to content

Commit

Permalink
Update Releasing Notes, & Enforce Version Pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker authored and jgstroud committed Jan 5, 2024
1 parent bd68f63 commit 1b6c26d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Update Manifest

on:
release:
types: [published]
workflow_dispatch:
release:
types: [published]
workflow_dispatch:

permissions:
actions: write
Expand All @@ -21,6 +21,19 @@ jobs:
- name: Tag
id: tag
uses: JinoArch/get-latest-tag@latest

- name: Check Tag
id: check-tag
run: |
echo "Latest Tag: ${{ steps.tag.outputs.latestTag }}"
if [[ ${{ steps.tag.outputs.latestTag }} =~ ^v[0-9].[0-9].[0-9]$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Match
if: steps.check-tag.outputs.match != 'true'
run: |
echo "Tag: ${{ steps.tag.outputs.latestTag }}, does not match the required format: v0.0.0"
exit 1
- name: Write version to manifest.json
uses: amochkin/action-json@v1
Expand Down Expand Up @@ -76,4 +89,4 @@ jobs:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
event-type: build-firmware
event-type: build-firmware
6 changes: 4 additions & 2 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The release process
===

Once a release is ready, all you have to do is create a GitHub Release and tag. Once that release is created it will kick off the `.github/workflows/build.yml` GitHub Action. This workflow will do all the work for you to get a new release out. It will create an updated manifest.json file with the new version from the tag that you ceated with the release. It will also create the firmware.bin file following the format of homekit-ratgdo-${{ latest-tag }}.bin"
Once a release is ready, all you have to do is create a GitHub Release and tag. Once that release is created it will kick off the `.github/workflows/manifest.yml` GitHub Action. This workflow will do all the work for you to get a new release out. It will create an updated manifest.json file with the new version from the tag that you ceated with the release. Once that workflow completes it then triggers another workflow, `.github/workflows/build.yml`, this workflow will create the firmware.bin file following the format of `homekit-ratgdo-${{ latest-tag }}.bin`.

When the firmware and manifest.json is updated, this will automatically update the flasher page as the /docs folder is what the flasher page looks at so no need to update anything in this folder.
When the firmware and manifest.json is updated, this will automatically update the flasher page as the /docs folder is what the flasher page looks at so no need to update anything in this folder.

Releases tag should be named v[0-9]+.[0-9]+.[0-9], example: `v0.7.0`. the workflows are designed to follows this pattern, if this pattern isn't followed then the workflow will stop.

0 comments on commit 1b6c26d

Please sign in to comment.