Skip to content

chore(release): publish v2.0.0-rc.6 #14

chore(release): publish v2.0.0-rc.6

chore(release): publish v2.0.0-rc.6 #14

name: all-nodejs-packages-publish
env:
NODEJS_VERSION: v18.18.2
on:
push:
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-publish-packages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.7
- run: git fetch --unshallow --prune
- uses: actions/setup-node@v4.0.3
with:
always-auth: true
node-version: ${{ env.NODEJS_VERSION }}
registry-url: "https://registry.npmjs.org/"
scope: "@hyperledger"
- run: cat /home/runner/work/_temp/.npmrc
- name: ./tools/ci.sh
run: ./tools/ci.sh
env:
DEV_BUILD_DISABLED: false
FULL_BUILD_DISABLED: false
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_RUNNER_DISABLED: true
- name: lerna-publish-npm
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "npm-ci@hyperledger.org"
git config --global user.name "hyperledger-ghci"
npm whoami
yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts
- run: cat /home/runner/work/_temp/.npmrc
# Reset the .npmrc by deleting it. Invoking the setup-node action again below
# will set it up from scratch again but with a different registry configuration
# so that we can publish to both registries instead of having to choose.
- run: rm /home/runner/work/_temp/.npmrc
- uses: actions/setup-node@v4.0.3
with:
always-auth: true
node-version: ${{ env.NODEJS_VERSION }}
registry-url: "https://npm.pkg.github.com/"
scope: "@hyperledger"
- run: cat /home/runner/work/_temp/.npmrc
# We run the publish script a second time after having reconfigured the registry to be GHCR
# instead of npmjs.org so that we can publish the packages everywhere.
- name: lerna-publish-ghcr
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config --global user.email "npm-ci@hyperledger.org"
git config --global user.name "hyperledger-ghci"
npm whoami
yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts