Publish the adf pkgs on gh pkg registry (#8313)

This commit is contained in:
Maurizio Vitale 2023-02-23 16:33:48 +00:00 committed by GitHub
parent 33d7fca2cf
commit 7d02ea61a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -65,7 +65,6 @@ env:
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
jobs:
setup:
timeout-minutes: 20
@ -146,6 +145,9 @@ jobs:
timeout-minutes: 15
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

View File

@ -96,7 +96,8 @@ function changeRegistry(args: PublishArgs, project: string) {
const folder = `${args.pathProject}/dist/libs/${project}`;
const content =
`strict-ssl=true
registry=https://${args.npmRegistry}
always-auth=true
@alfresco:registry=https://${args.npmRegistry}
//${args.npmRegistry}/:_authToken="${args.tokenRegistry}"`;
try {

View File

@ -23,10 +23,18 @@ then
TAG_NPM=alpha
fi
echo "Publishing on npm with tag $TAG_NPM"
echo "Publishing on Public npm registry with tag $TAG_NPM"
./node_modules/@alfresco/adf-cli/bin/adf-cli npm-publish \
--npmRegistry $NPM_REGISTRY_ADDRESS \
--tokenRegistry $NPM_REGISTRY_TOKEN \
--tag $TAG_NPM \
--pathProject "$(pwd)" \
"$@"
echo "Publishing on GH PKG registry with tag $TAG_NPM"
./node_modules/@alfresco/adf-cli/bin/adf-cli npm-publish \
--npmRegistry "npm.pkg.github.com" \
--tokenRegistry $github_token \
--tag $TAG_NPM \
--pathProject "$(pwd)" \
"$@"