Skip to content

Commit 11e5570

Browse files
Improve the release action
* Clean unneeded steps * Add support for package tag
1 parent a518060 commit 11e5570

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

.cirrus.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ qa_script_definition: &QA_SCRIPT_DEFINITION
4040
folder: build
4141
fingerprint_script: echo $CIRRUS_BUILD_ID
4242
setup_script:
43-
- rm node_modules -rf
4443
- (cd build && npm pack)
4544
- cp build/sonar-scan-SNAPSHOT.tgz test/integration
4645
- (cd test/integration && npm install --no-save sonar-scan-SNAPSHOT.tgz)

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ jobs:
4040
cp LICENSE build
4141
cp README.md build
4242
43-
- name: Setup JFrog for deploy
44-
uses: SonarSource/jfrog-setup-wrapper@907e87c3d2081a98d2ab8cb03284ee6711f1ee83 # tag=3.2.3
45-
with:
46-
jfrogAccessToken: ${{ fromJSON(steps.secrets.outputs.vault).promoter_access_token }}
43+
- name: Install JFrog CLI
44+
uses: SonarSource/jfrog-setup-wrapper@v3
4745

4846
- name: Publish the package to Artifactory
4947
run: |
@@ -59,6 +57,7 @@ jobs:
5957
- name: Publish the package to npm
6058
run: |
6159
cd build
62-
npm publish --dry-run
60+
[ ${{ github.event.release.prerelease }} == true ] && TAG="next" || TAG="latest"
61+
npm publish --tag=$TAG --access=public
6362
echo $(jq '.name = "sonarqube-scanner"' package.json) > package.json
64-
npm publish --dry-run
63+
npm publish --tag=$TAG --access=public

0 commit comments

Comments
 (0)