From 216be9b50a0b789d785c86d6ac326ce510cecb04 Mon Sep 17 00:00:00 2001 From: Roland Schmitt <13732585+agentschmitt@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:53:55 +0100 Subject: [PATCH] ASMO-6379 change package version by cicd so we dont need to do that manually before tagging anymore --- .github/workflows/cicd.yaml | 3 +++ README.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 72b137d..48763b0 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -20,6 +20,9 @@ jobs: - run: node --version - run: npm clean-install - run: npm run build + - if: startsWith(github.ref, 'refs/tags/') + name: set package.json version by tag + run: npm version --allow-same-version --no-commit-hooks --no-git-tag-version from-git - if: startsWith(github.ref, 'refs/tags/') uses: JS-DevTools/npm-publish@v3 with: diff --git a/README.md b/README.md index 8684adf..169452d 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,9 @@ Full documentation is [on the Wiki](https://github.com/recogito/recogito-js/wiki [BSD 3-Clause](LICENSE) (= feel free to use this code in whatever way you wish. But keep the attribution/license file, and if this code breaks something, don't complain to us :-) + +## How to publish + +- Create & Push a tag with new version number +- The CICD actions will take this version number for npm package automatically +- Check github action to validated, that package was released to npm registry. diff --git a/package-lock.json b/package-lock.json index c5f70a1..23c9dfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@samhammer/recogito-js", - "version": "1.8.12", + "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@samhammer/recogito-js", - "version": "1.8.12", + "version": "0.0.0", "license": "BSD-3-Clause", "dependencies": { "@recogito/recogito-client-core": "1.7.9", diff --git a/package.json b/package.json index 832b2af..a9bb606 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@samhammer/recogito-js", - "version": "1.8.12", + "version": "0.0.0", "description": "A JavaScript library for text annotation", "main": "dist/recogito.min.js", "typings": "typings/index.d.ts",