Skip to content

Commit c3db6db

Browse files
authored
Merge pull request #31 from agoda-com/publish-pkg
Publish pkg
2 parents b4a3129 + 3383d90 commit c3db6db

File tree

7 files changed

+26
-8
lines changed

7 files changed

+26
-8
lines changed

.github/workflows/npm-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,17 @@ jobs:
3333
run: npx nx report
3434
shell: bash
3535

36+
- name: Extract version from tag
37+
id: get_version
38+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
39+
shell: bash
40+
3641
- name: Publish packages
37-
run: npx nx release publish
42+
run: |
43+
git config --global user.email "ratchapol.an@gmail.com"
44+
git config --global user.name "ratchapol-an"
45+
npx nx release version ${{ steps.get_version.outputs.VERSION }} --git-tag false
46+
npx nx release publish
3847
shell: bash
3948
env:
4049
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

nx.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@
5151
],
5252
"release": {
5353
"version": {
54-
"generatorOptions": {
55-
"currentVersionResolver": "git-tag",
56-
"specifierSource": "conventional-commits"
57-
}
54+
"preVersionCommand": "npx nx run-many -t build"
5855
}
5956
},
6057
"targetDefaults": {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/common/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@
2424
},
2525
"publishConfig": {
2626
"access": "public"
27+
},
28+
"repository": {
29+
"url": "https://github.com/agoda-com/devfeedback-js"
2730
}
2831
}

packages/rspack-plugin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@
2828
},
2929
"publishConfig": {
3030
"access": "public"
31+
},
32+
"repository": {
33+
"url": "https://github.com/agoda-com/devfeedback-js"
3134
}
3235
}

packages/vite-plugin/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "agoda-devfeedback-vite",
2+
"name": "agoda-devfeedback-vite2",
33
"version": "0.0.1",
44
"type": "module",
55
"main": "./dist/index.js",
@@ -23,5 +23,8 @@
2323
},
2424
"publishConfig": {
2525
"access": "public"
26+
},
27+
"repository": {
28+
"url": "https://github.com/agoda-com/devfeedback-js"
2629
}
2730
}

packages/webpack-plugin/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@
2525
},
2626
"publishConfig": {
2727
"access": "public"
28+
},
29+
"repository": {
30+
"url": "https://github.com/agoda-com/devfeedback-js"
2831
}
2932
}

0 commit comments

Comments
 (0)