Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit c3dcf1c

Browse files
Use token as part of workflow (#1544)
1 parent 835bb11 commit c3dcf1c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/js-api-build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ env:
1616
GITHUB_BRANCH: ${{ github.ref }}
1717
GITHUB_PULL_REQUEST: ${{ github.event.number }}
1818
GITHUB_BUILD_NUMBER: ${{ github.run_number }}
19-
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
20-
NPM_REGISTRY_ADDRESS: ${{ vars.NPM_REGISTRY_ADDRESS }}
2119

2220
jobs:
2321
build:
@@ -112,11 +110,11 @@ jobs:
112110
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
113111
with:
114112
node-version: 16
115-
registry-url: 'https://${NPM_REGISTRY_ADDRESS}'
113+
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
116114
scope: '@alfresco'
117115
- run: ./scripts/publish.sh
118116
env:
119-
NODE_AUTH_TOKEN: $NPM_REGISTRY_TOKEN
117+
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
120118

121119
- uses: actions/setup-node@v3
122120
name: Release library GH registry

scripts/publish.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ fi
1212

1313
cd dist/
1414

15-
echo "Publishing on npm registry: ${NPM_REGISTRY_ADDRESS} with tag $TAG_NPM"
15+
echo "Publishing on npm with tag $TAG_NPM"
1616

1717
cat package.json | grep version
1818

1919
npm publish --tag ${TAG_NPM} || exit 1
20+
21+
rm -rf .npmrc

0 commit comments

Comments
 (0)