1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Publish to the correct channels instead of always latest

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-17 10:46:56 -05:00
parent b2ac628d05
commit ee11735cb7
5 changed files with 21 additions and 9 deletions

View File

@ -30,6 +30,7 @@ jobs:
commit: master commit: master
tag: ${{ steps.tagger.outputs.tagname }} tag: ${{ steps.tagger.outputs.tagname }}
body: ${{ github.event.pull_request.body }} body: ${{ github.event.pull_request.body }}
prerelease: ${{ endsWith(steps.tagger.outputs.tagname, '-alpha') || endsWith(steps.tagger.outputs.tagname, '-beta') }}
publish-npm: publish-npm:
uses: ./.github/workflows/publish-release-npm.yml uses: ./.github/workflows/publish-release-npm.yml
needs: release needs: release

View File

@ -3,7 +3,6 @@ CMD_ARGS = $(filter-out $@,$(MAKECMDGOALS))
%: %:
@: @:
NPM_RELEASE_TAG ?= latest
ELECTRON_BUILDER_EXTRA_ARGS ?= ELECTRON_BUILDER_EXTRA_ARGS ?=
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
@ -84,13 +83,11 @@ build-extension-types: node_modules packages/extensions/dist
.PHONY: publish-extensions-npm .PHONY: publish-extensions-npm
publish-extensions-npm: node_modules build-extensions-npm publish-extensions-npm: node_modules build-extensions-npm
./node_modules/.bin/npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" ./scripts/publish-extensions-npm.sh
cd packages/extensions && npm publish --access=public --tag=$(NPM_RELEASE_TAG) && git restore package.json
.PHONY: publish-library-npm .PHONY: publish-library-npm
publish-library-npm: node_modules build-library-npm publish-library-npm: node_modules build-library-npm
./node_modules/.bin/npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" ./scripts/publish-library-npm.sh
npm publish --access=public --tag=$(NPM_RELEASE_TAG)
.PHONY: build-docs .PHONY: build-docs
build-docs: build-docs:

View File

@ -0,0 +1,7 @@
#!/bin/bash
./node_modules/.bin/npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
NPM_RELEASE_TAG=$(cat package.json | jq .version --raw-output | rg '.*-(?P<channel>\w+).*' -r '$channel' | cat)
cd packages/extensions && npm publish --access=public --tag=${NPM_RELEASE_TAG:-latest} && git restore package.json

7
scripts/publish-library-npm.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
./node_modules/.bin/npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
NPM_RELEASE_TAG=$(cat package.json | jq .version --raw-output | rg '.*-(?P<channel>\w+).*' -r '$channel' | cat)
npm publish --access=public --tag=${NPM_RELEASE_TAG:-latest}

View File

@ -5899,10 +5899,10 @@ eslint-plugin-react-hooks@^4.6.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==
eslint-plugin-react@7.32.1: eslint-plugin-react@7.32.0:
version "7.32.1" version "7.32.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.1.tgz#88cdeb4065da8ca0b64e1274404f53a0f9890200" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.0.tgz#d80f794a638c5770f952ba2ae793f0a516be7c09"
integrity sha512-vOjdgyd0ZHBXNsmvU+785xY8Bfe57EFbTYYk8XrROzWpr9QBvpjITvAXt9xqcE6+8cjR/g1+mfumPToxsl1www== integrity sha512-vSBi1+SrPiLZCGvxpiZIa28fMEUaMjXtCplrvxcIxGzmFiYdsXQDwInEjuv5/i/2CTTxbkS87tE8lsQ0Qxinbw==
dependencies: dependencies:
array-includes "^3.1.6" array-includes "^3.1.6"
array.prototype.flatmap "^1.3.1" array.prototype.flatmap "^1.3.1"