From cafef645b5a9b94ffe67ea53c1bc59386f1c7eb3 Mon Sep 17 00:00:00 2001 From: Korenevskiy Denis Date: Thu, 10 Oct 2024 12:16:03 +0300 Subject: [PATCH 1/3] upload npm packages to default public npm registry --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7e56383..b9f6260 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,11 +20,12 @@ jobs: needs: - init - uses: milaboratory/github-ci/.github/workflows/node-simple.yaml@v4-beta + uses: milaboratory/github-ci/.github/workflows/node-simple.yaml@v4 with: app-name: Blast PL package app-name-slug: 'blast' notify-telegram: true + registry-url: https://registry.npmjs.org node-version: '20.x' is-electron-application: 'false' From c9c1813264c572c6d3b11046bc55a63efccc2c71 Mon Sep 17 00:00:00 2001 From: Korenevskiy Denis Date: Thu, 10 Oct 2024 13:22:00 +0300 Subject: [PATCH 2/3] change the way how packages build and publication is triggered --- .github/workflows/build.yaml | 2 -- package.json | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b9f6260..b92a573 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,8 +36,6 @@ jobs: test: false test-script-name: 'test' - publish-script-name: 'release' - aws-login-enable: true gcp-login-enable: true diff --git a/package.json b/package.json index c0b53ba..624d796 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "description": "Blast software package for Platforma Backend", "scripts": { "build": "true", + "pkg:build": "rm -rf dld && ./scripts/build.sh 2.16.0", + "pkg:publish": "./scripts/publish.sh 2.16.0", - "publish:packages": "./scripts/publish.sh 2.16.0", - "publish:descriptors": "pl-pkg publish descriptors", - "release": "npm run pkg:build && npm run publish:packages && npm run publish:descriptors" + "prepublishOnly": "npm run pkg:build && npm run pkg:publish" }, "files": [ "dist/" From fc0aff30cfb4ec35ec7a1c92de83ef0a53ea52b4 Mon Sep 17 00:00:00 2001 From: Vladimir Antropov Date: Thu, 10 Oct 2024 17:19:55 +0200 Subject: [PATCH 3/3] chore: add npmrc config and enable publish to public --- .github/workflows/build.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b92a573..a875372 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,7 +25,6 @@ jobs: app-name: Blast PL package app-name-slug: 'blast' notify-telegram: true - registry-url: https://registry.npmjs.org node-version: '20.x' is-electron-application: 'false' @@ -36,13 +35,24 @@ jobs: test: false test-script-name: 'test' + publish-to-public: true aws-login-enable: true gcp-login-enable: true + npmrc-config: | + { + "registries": { + "https://registry.npmjs.org/": { + "scopes": ["platforma-open"], + "tokenVar": "NPMJS_TOKEN" + } + } + } secrets: env: | { - "PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }} + "PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }}, + "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }} } AWS_ASSUME_ROLE: ${{ secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE }}