diff --git a/.github/workflows/publish-release-npm.yml b/.github/workflows/publish-release-npm.yml index 0ce928e3d1..8dbf9f52ba 100644 --- a/.github/workflows/publish-release-npm.yml +++ b/.github/workflows/publish-release-npm.yml @@ -1,8 +1,16 @@ name: Publish NPM Package Release on: - release: - types: - - published + workflow_call: + inputs: + version: + required: true + type: string + workflow_dispatch: + inputs: + version: + required: true + type: string + description: The version to release manually jobs: publish: name: Publish NPM Package Release @@ -15,6 +23,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{ inputs.version }} - name: Using Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -26,7 +35,6 @@ jobs: make build-npm - name: publish new release - if: contains(github.ref, 'refs/tags/v') run: | make publish-npm env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f66347a93f..2c5d84bf0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ jobs: name: Release runs-on: ubuntu-latest if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') }} + outputs: + version: ${{ steps.tagger.outputs.tagname }} steps: - name: Checkout Release from lens uses: actions/checkout@v3 @@ -28,3 +30,9 @@ jobs: commit: master tag: ${{ steps.tagger.outputs.tagname }} body: ${{ github.event.pull_request.body }} + publish-npm: + uses: ./.github/workflows/publish-release-npm.yml + needs: release + if: ${{ needs.release.outputs.version != '' }} + with: + version: ${{ needs.release.outputs.version }} diff --git a/package.json b/package.json index 0b60495378..222fe58033 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "OpenLens", "description": "OpenLens - Open Source IDE for Kubernetes", "homepage": "https://github.com/lensapp/lens", - "version": "6.2.5", + "version": "6.2.6", "main": "static/build/main.js", "copyright": "© 2022 OpenLens Authors", "license": "MIT", diff --git a/src/common/k8s-api/endpoints/helm-charts.api/request-readme.injectable.ts b/src/common/k8s-api/endpoints/helm-charts.api/request-readme.injectable.ts index c6815c4b93..a487672a92 100644 --- a/src/common/k8s-api/endpoints/helm-charts.api/request-readme.injectable.ts +++ b/src/common/k8s-api/endpoints/helm-charts.api/request-readme.injectable.ts @@ -3,12 +3,13 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; +import type { AsyncResult } from "../../../utils/async-result"; import { urlBuilderFor } from "../../../utils/buildUrl"; import { apiBaseInjectionToken } from "../../api-base"; const requestReadmeEndpoint = urlBuilderFor("/v2/charts/:repo/:name/readme"); -export type RequestHelmChartReadme = (repo: string, name: string, version?: string) => Promise; +export type RequestHelmChartReadme = (repo: string, name: string, version?: string) => Promise>; const requestHelmChartReadmeInjectable = getInjectable({ id: "request-helm-chart-readme", diff --git a/src/common/k8s-api/endpoints/helm-charts.api/request-values.injectable.ts b/src/common/k8s-api/endpoints/helm-charts.api/request-values.injectable.ts index ec927fc37a..59234a80f3 100644 --- a/src/common/k8s-api/endpoints/helm-charts.api/request-values.injectable.ts +++ b/src/common/k8s-api/endpoints/helm-charts.api/request-values.injectable.ts @@ -3,12 +3,13 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; +import type { AsyncResult } from "../../../utils/async-result"; import { urlBuilderFor } from "../../../utils/buildUrl"; import { apiBaseInjectionToken } from "../../api-base"; const requestValuesEndpoint = urlBuilderFor("/v2/charts/:repo/:name/values"); -export type RequestHelmChartValues = (repo: string, name: string, version: string) => Promise; +export type RequestHelmChartValues = (repo: string, name: string, version: string) => Promise>; const requestHelmChartValuesInjectable = getInjectable({ id: "request-helm-chart-values", diff --git a/src/features/helm-charts/installing-chart/__snapshots__/opening-dock-tab-for-installing-helm-chart.test.ts.snap b/src/features/helm-charts/installing-chart/__snapshots__/opening-dock-tab-for-installing-helm-chart.test.ts.snap index e9a5c74a65..ed59b911b5 100644 --- a/src/features/helm-charts/installing-chart/__snapshots__/opening-dock-tab-for-installing-helm-chart.test.ts.snap +++ b/src/features/helm-charts/installing-chart/__snapshots__/opening-dock-tab-for-installing-helm-chart.test.ts.snap @@ -4631,6 +4631,919 @@ exports[`opening dock tab for installing helm chart given application is started `; +exports[`opening dock tab for installing helm chart given application is started, when navigating to helm charts when charts resolve when opening details of a chart when chart versions resolve when readme resolves when selecting different version when readme rejects renders 1`] = ` + +
+
+
+