Skip to content

Commit 1fb5258

Browse files
committed
ASMO-6379 change package version by cicd
so we dont need to do that manually before tagging anymore
1 parent 6e3bc94 commit 1fb5258

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- run: yarn lint
2424
- run: yarn test
2525
- run: yarn build
26+
- if: startsWith(github.ref, 'refs/tags/')
27+
name: set package.json version by tag
28+
run: npm version --allow-same-version --no-commit-hooks --no-git-tag-version from-git
2629
- if: startsWith(github.ref, 'refs/tags/')
2730
uses: JS-DevTools/npm-publish@v3
2831
with:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,6 @@ Available Options:
7474
7575
## How to publish
7676
77-
- Increase version by 'yarn version' command on local machine. This updates package.json and creates tag
77+
- Create & Push a tag with new version number
78+
- The CICD actions will take this version number for npm package automatically
7879
- Check github action to validated, that package was released to npm registry.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@samhammer/vault-client-sag",
3-
"version": "1.1.1",
3+
"version": "0.0.0",
44
"main": "dist/index.js",
55
"types": "dist/main.d.ts",
66
"files": [
@@ -18,8 +18,7 @@
1818
"run": "ncc build src/run.ts && node dist/index.js",
1919
"format": "prettier --write --parser typescript ./src",
2020
"lint": "eslint ./src --fix",
21-
"test": "jest",
22-
"postversion": "git push && git push --tags"
21+
"test": "jest"
2322
},
2423
"devDependencies": {
2524
"@rushstack/eslint-patch": "^1.2.0",

0 commit comments

Comments
 (0)