Skip to content

Commit

Permalink
fix release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jun 19, 2024
1 parent 6ae15f0 commit 64d05bc
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 22 deletions.
42 changes: 42 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'

categories:
- title: 'Breaking Changes'
labels:
- 'breaking change'
- title: 'Featured Changes'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Other Changes'
labels:
- 'documentation'

autolabeler:
- label: 'fix'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'feature'
branch:
- '/feature\/.+/'

change-template: '- $TITLE @$AUTHOR [#$NUMBER]'
template: |
Homebridge Apt Package Manifest
| Package | Version |
|:-------:|:-------:|
|NodeJS| v*.*.* |
|Homebridge-Config-UI-X| *.*.* |
|Homebridge| *.*.* |
## Other Changes
$CHANGES
16 changes: 1 addition & 15 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@

changelog:
categories:
- title: Breaking Changes 🛠
- title: Homebridge Apt Package Manifest
labels:
- 'breaking change'
- title: Featured Changes ✨
labels:
- 'feature'
- 'enhancement'
- title: Bug Fixes 🐛
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: Other Changes
labels:
- "chore"
- "housekeeping"
- "*"
22 changes: 15 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
tag:
name: Verify Release Tag
name: Release Tag
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
Expand Down Expand Up @@ -95,6 +95,14 @@ jobs:
run: |
docker run --rm -v $(pwd):/repo -e PKG_RELEASE_TYPE="${{ needs.release_type.outputs.release_type }}" -e PKG_RELEASE_VERSION="${{ needs.tag.outputs.version }}" package-build
- name: Rename package to include v
run: |
mv *.deb homebridge_v${{ needs.tag.outputs.version }}_${{ matrix.QEMU_ARCH }}.deb
- name: Rename manifest to include v
run: |
mv *.manifest homebridge_v${{ needs.tag.outputs.version }}_${{ matrix.QEMU_ARCH }}.manifest
- name: Set variables
run: |
echo BODY_FILE="$(ls *.manifest)" >> $GITHUB_ENV
Expand All @@ -103,23 +111,23 @@ jobs:
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.tag.outputs.version }}
TAG_NAME: v${{ needs.tag.outputs.version }}
with:
is_append_body: "Contents of ${{ matrix.QEMU_ARCH }} Package."

- name: update release
uses: tubone24/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ needs.tag.outputs.version }}
TAG_NAME: v${{ needs.tag.outputs.version }}
with:
body_path: ${{ env.BODY_FILE }}

- uses: AButler/[email protected]
with:
files: '*.deb;*.manifest'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ needs.tag.outputs.version }}
release-tag: v${{ needs.tag.outputs.version }}

update-apt-repo:
name: Publish to Repo
Expand All @@ -134,7 +142,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ needs.tag.outputs.version }}
tag: v${{ needs.tag.outputs.version }}

- name: Download release assets
uses: dsaltares/[email protected]
Expand Down Expand Up @@ -185,7 +193,7 @@ jobs:
with:
title: "Homebridge APT Package Release"
description: |
Version `${{ needs.tag.outputs.version }}`
url: "https://github.com/homebridge/homebridge-apt-pkg/releases/tag/${{ needs.tag.outputs.version }}"
Version `v${{ needs.tag.outputs.version }}`
url: "https://github.com/homebridge/homebridge-apt-pkg/releases/tag/v${{ needs.tag.outputs.version }}"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}

0 comments on commit 64d05bc

Please sign in to comment.