diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db8db0a..709a839 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,8 +52,7 @@ jobs: - name: Update artifacthub-pkg.yml run: | VERSION="${{ inputs.version }}" - PKG_NAME=$(jq -r .name package.json) - RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/${PKG_NAME}-${VERSION}.tar.gz" + RELEASE_URL="https://github.com/${{ github.repository }}/releases/download/v${VERSION}/headlamp-rook-plugin-${VERSION}.tar.gz" sed -i "s/^version:.*/version: \"${VERSION}\"/" artifacthub-pkg.yml sed -i "s|headlamp/plugin/archive-url:.*|headlamp/plugin/archive-url: \"${RELEASE_URL}\"|" artifacthub-pkg.yml @@ -69,11 +68,12 @@ jobs: - name: Prepare release tarball run: | VERSION="${{ inputs.version }}" - PKG_NAME=$(jq -r .name package.json) - TARBALL="${PKG_NAME}-${VERSION}.tar.gz" - mv *.tar.gz "$TARBALL" + TARBALL="headlamp-rook-plugin-${VERSION}.tar.gz" + GENERATED=$(ls *.tar.gz) + if [ "$GENERATED" != "$TARBALL" ]; then + mv "$GENERATED" "$TARBALL" + fi echo "TARBALL=$TARBALL" >> $GITHUB_ENV - echo "PKG_NAME=$PKG_NAME" >> $GITHUB_ENV - name: Validate tarball run: | diff --git a/artifacthub-pkg.yml b/artifacthub-pkg.yml index 340db1c..be19a4a 100644 --- a/artifacthub-pkg.yml +++ b/artifacthub-pkg.yml @@ -27,7 +27,7 @@ changes: description: "Package renamed to rook so the plugin displays correctly in Headlamp's Plugins list" annotations: - headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-rook-plugin/releases/download/v0.2.2/rook-0.2.2.tar.gz" + headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-rook-plugin/releases/download/v0.2.2/headlamp-rook-plugin-0.2.2.tar.gz" headlamp/plugin/archive-checksum: "sha256:0c0d39f275f206cd0fe66a17f98c9bf0b9a5d74122bad770c7d4051e59f85675" headlamp/plugin/distro-compat: "" headlamp/plugin/version-compat: ">=0.20"