Skip to content

Commit

Permalink
BUILD-5492: test release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jayadeep Kinavoor Madam <[email protected]>
  • Loading branch information
jayadeep-km-sonarsource committed Jul 22, 2024
1 parent 4e9f871 commit 5bb355d
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/.npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
always-auth=true
email=[email protected]
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
//repox.jfrog.io/artifactory/api/npm/:_authToken=${NPM_TOKEN}
43 changes: 43 additions & 0 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches:
- feat/jd/BUILD-5492-test-release

jobs:
publish:
permissions:
contents: read
id-token: write # required for SonarSource/vault-action-wrapper
runs-on: ubuntu-latest
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
REPOX_URL: 'https://repox.jfrog.io/artifactory'
ARTIFACTORY_DEPLOY_REPO: sonarsource-npm-public-qa
NPM_REPOSITORY: 'sonarsource-npm-public'
SCOPE: ''
PACKAGE: 'sonarqube-scanner'
steps:
- name: Vault
id: secrets
uses: SonarSource/vault-action-wrapper@v3
with:
secrets:
development/artifactory/token/SonarSource-sonar-scanner-npm-qa-deployer access_token | qa_deployer_access_token;
development/artifactory/token/SonarSource-sonar-scanner-npm-promoter access_token | promoter_access_token;
development/kv/data/npmjs sonartech_npm_token | npm_token;
development/kv/data/repox url | repox_url;
- name: Setup JFrog for deploy
uses: SonarSource/jfrog-setup-wrapper@907e87c3d2081a98d2ab8cb03284ee6711f1ee83 # tag=3.2.3
with:
jfrogAccessToken: ${{ fromJSON(steps.secrets.outputs.vault).qa_deployer_access_token }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: mv .github/workflows/.npmrc .npmrc
- name: Build npm package
env:
NPM_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).npm_token }}
run: |
npm install
npm run build
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
always-auth=true
email=[email protected]
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

0 comments on commit 5bb355d

Please sign in to comment.