Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Releasing Notes, & Enforce Version Pattern #82

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.