forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(github): fix release automation - add all npm registry auth tokens
1. The node-setup github action was only adding the npmjs.org registry creds. 2. Now it also adds the github package registry's credentials so that the lerna publish script can succeed. Signed-off-by: Peter Somogyvari <[email protected]>
- Loading branch information
Showing
1 changed file
with
41 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ env: | |
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
tags: | ||
- v* | ||
|
||
|
@@ -13,30 +15,45 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build-and-publish-packages: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: git fetch --unshallow --prune | ||
- uses: actions/[email protected] | ||
with: | ||
always-auth: true | ||
node-version: ${{ env.NODEJS_VERSION }} | ||
registry-url: 'https://registry.npmjs.org' | ||
- 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 | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "hyperledger-ghci" | ||
npm whoami | ||
yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts | ||
- uses: actions/[email protected] | ||
- run: git fetch --unshallow --prune | ||
- uses: actions/[email protected] | ||
with: | ||
always-auth: true | ||
node-version: ${{ env.NODEJS_VERSION }} | ||
registry-url: "https://registry.npmjs.org/" | ||
|
||
- run: echo "FIRST REGISTRY ADDED" | ||
- run: cat /home/runner/work/_temp/.npmrc | ||
|
||
- run: echo "ADDING SECOND REGISTRY" | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
always-auth: true | ||
node-version: ${{ env.NODEJS_VERSION }} | ||
registry-url: "https://npm.pkg.github.com/" | ||
|
||
- run: echo "ADDED SECOND REGISTRY" | ||
- 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 | ||
# env: | ||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# run: | | ||
# git config --global user.email "[email protected]" | ||
# git config --global user.name "hyperledger-ghci" | ||
# npm whoami | ||
# yarn lerna publish from-git --yes --loglevel=debug --ignore-scripts |