Skip to content

Manually Attach Artifacts against 4.52.3 #16

Manually Attach Artifacts against 4.52.3

Manually Attach Artifacts against 4.52.3 #16

name: Manually Attach Artifacts ( If the automation fails )
run-name: Manually Attach Artifacts against ${{ github.event.inputs.tag }}
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag - must not start with v'
required: true
jobs:
build:
name: Attach Artifact
runs-on: ubuntu-latest
steps:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20.x
# 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
if: startsWith(github.event.inputs.tag, 'v')
run: |
echo "Release Tag name must not start with 'v', this was supplied ${{github.event.inputs.tag}}"
exit 1
- name: Install package
run: |
export npm_config_prefix=$(pwd)/package
npm install -g homebridge-config-ui-x@${{ github.event.inputs.tag }}
- name: Remove invalid node-pty node-gyp run
run: |
rm -rf $(pwd)/package/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build
- 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
- name: Attach Bundle
uses: AButler/[email protected]
with:
files: 'homebridge-config-ui-x-${{ github.event.inputs.tag }}.tar.gz;SHASUMS256.txt'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.event.inputs.tag }}