diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 7c41acd..b01ff3c 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -20,20 +20,34 @@ jobs: with: token: ${{ secrets.NPM_PUBLISH_TOKEN }} access: public - - name: getVersion + + update-nr-catalogue: + name: Update Node-RED Catalogue + needs: [publish] + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install jq + shell: bash + run: command -v jq || (sudo apt-get update && sudo apt-get install -y jq) + - name: Get package version id: getVersion shell: bash run: | - VERSION=$(npm info . --json version | sed -e 's/"//g') + VERSION=$(jq -r .version package.json) echo "version=$VERSION" >> $GITHUB_OUTPUT - - uses: flowfuse/github-actions-workflows/actions/update-nr-flows@update-nr-flows/v1 + - name: Update Node-RED Catalogue + uses: flowfuse/github-actions-workflows/actions/update-nr-flows@update-nr-flows/v1 with: package: '@flowfuse/node-red-function-gpt' version: ${{ steps.getVersion.outputs.version }} notify-slack: name: Notify about release failure - needs: [publish] + needs: [publish, update-nr-catalogue] if: failure() runs-on: ubuntu-latest