Skip to content

Commit

Permalink
update github release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Nov 19, 2023
1 parent 35eaab7 commit 617d3ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/Attach Artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Manually Attach Artifacts ( If the automation fails )
run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }}

on:
repository_dispatch:
types: [attach-artifacts]
workflow_dispatch:
inputs:
tag:
Expand All @@ -19,6 +21,10 @@ jobs:
with:
node-version: 20.x

- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"

# Sanity check to ensure that release tags don't start with a 'v' version prefix but adhere to the X.Y.Z format
- name: Check for Tag name Format
# https://github.com/orgs/community/discussions/25017
Expand All @@ -30,7 +36,7 @@ jobs:
- name: Install package
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }}
npm install -g homebridge-config-ui-x@$${{ needs.analyze-tags.outputs.previous-tag }}
- name: Remove invalid node-pty node-gyp run
run: |
Expand All @@ -39,11 +45,11 @@ jobs:
- name: Create Bundle
run: |
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz > SHASUMS256.txt
shasum -a 256 homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz > SHASUMS256.txt
- name: Attach Bundle
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt'
files: 'homebridge-config-ui-x-${{ needs.analyze-tags.outputs.previous-tag }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.inputs.tag }}
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Node Release
run-name: Production Release ${{ github.event.release.tag_name }}

on:
# Removed publish on push, and forced manual release from github
# push:
# branches: [latest]
# tags:
# - '*.*.*'
# Removed publish on push, and forced manual release from github
# push:
# branches: [latest]
# tags:
# - '*.*.*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -61,9 +61,7 @@ jobs:
tar -C $(pwd)/package --owner=0 --group=0 --format=posix -czvf homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz .
shasum -a 256 homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz > SHASUMS256.txt
- name: Attach Bundle
uses: AButler/upload-release-assets@v2.0
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
files: 'homebridge-config-ui-x-${{ github.event.release.tag_name }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.release.tag_name }}
event-type: attach-artifacts

0 comments on commit 617d3ac

Please sign in to comment.