1- on :
1+ on :
22 release :
33 types :
44 - published
55
6- jobs :
6+ jobs :
77 publish :
88 runs-on : ubuntu-latest
99 env :
@@ -12,26 +12,39 @@ jobs:
1212 NPM_REPOSITORY : " sonarsource-npm-public"
1313 SCOPE : " "
1414 PACKAGE : " eslint-plugin-sonarjs"
15- steps :
16- - name : Setup JFrog CLI
17- uses : jfrog/setup-jfrog-cli@v2
18- env :
19- JF_ENV_1 : ${{ secrets.REPOX_CLI_CONFIG_QA_DEPLOYER_LT }}
15+ steps :
16+ - name : Vault
17+ id : secrets
18+ uses : SonarSource/vault-action-wrapper@d1c1ab4ca5ad07fd9cdfe1eff038a39673dfca64 # tag=2.4.2-1
19+ with :
20+ url : ${{ inputs.vaultAddr }}
21+ secrets :
22+ development/artifactory/token/{REPO_OWNER_NAME_DASH}-qa-deployer access_token | qa_deployer_access_token;
23+ development/artifactory/token/{REPO_OWNER_NAME_DASH}-promoter access_token | promoter_access_token;
24+ development/kv/data/npmjs sonartech_npm_token | npm_token;
25+ - name : Setup JFrog for deploy
26+ uses : SonarSource/jfrog-setup-wrapper@eb712d76540e5d1f3756303f30387657fb204e52 # tag=2.4.1-1
27+ with :
28+ jfrogAccessToken : ${{ fromJSON(steps.secrets.outputs.vault).qa_deployer_access_token }}
2029 - uses : actions/checkout@v1
2130 - uses : actions/setup-node@v1
2231 with :
23- node-version : 12
24- - run : mv .github/workflows/.npmrc .npmrc
25- - name : Publish npm package
32+ node-version : 12
33+ - run : mv .github/workflows/.npmrc .npmrc
34+ - name : Publish npm package
2635 env :
27- NPM_TOKEN : ${{ secrets.SONARTECH_NPM_TOKEN }}
28- REPOX_CLI_CONFIG_BUILD_PROMOTER_LT : ${{ secrets.REPOX_CLI_CONFIG_BUILD_PROMOTER_LT }}
36+ NPM_TOKEN : ${{ fromJSON(steps.secrets.outputs.vault).npm_token }}
2937 run : |
3038 jfrog rt npm-config --repo-resolve npm --repo-deploy sonarsource-npm-public-qa
31- jfrog rt npm-ci
39+ jfrog rt npm-ci
3240 npm publish
3341 jfrog rt npm-publish --build-name=eslint-plugin-sonarjs --build-number=${{ github.event.release.tag_name }}
3442 jfrog rt build-publish eslint-plugin-sonarjs ${{ github.event.release.tag_name }}
35- jfrog config import $REPOX_CLI_CONFIG_BUILD_PROMOTER_LT
43+ - name : Setup JFrog for promotion
44+ uses : SonarSource/jfrog-setup-wrapper@eb712d76540e5d1f3756303f30387657fb204e52 # tag=2.4.1-1
45+ with :
46+ jfrogAccessToken : ${{ fromJSON(steps.secrets.outputs.vault).promoter_access_token }}
47+ - name : Promote npm package
48+ run : |
3649 jfrog rt bpr --status it-passed eslint-plugin-sonarjs ${{ github.event.release.tag_name }} sonarsource-npm-public-builds
3750 jfrog rt bpr --status released eslint-plugin-sonarjs ${{ github.event.release.tag_name }} sonarsource-npm-public-releases
0 commit comments