From d271f6e009f51beacfb6aaa1ce9b00ec916803dc Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Sat, 11 Nov 2023 12:22:24 -0600 Subject: [PATCH] Update Attach Artifacts.yml --- .github/workflows/Attach Artifacts.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Attach Artifacts.yml b/.github/workflows/Attach Artifacts.yml index 1fd752f94..f8e48a5dd 100644 --- a/.github/workflows/Attach Artifacts.yml +++ b/.github/workflows/Attach Artifacts.yml @@ -20,6 +20,10 @@ jobs: uses: actions/setup-node@v1 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 @@ -32,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: | @@ -41,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/upload-release-assets@v2.0 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 }}