Skip to content

Commit 95a2166

Browse files
committed
fix 🐛(ci): change publish npm (#17)
Signed-off-by: Luis Mayta <luis@hadenlabs.com>
1 parent 5f62b9c commit 95a2166

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,31 @@ jobs:
2020
runs-on: ubuntu-24.04
2121
steps:
2222
- name: Check out a copy of the repo
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
fetch-tags: true
27+
2428
- name: Use Node.js ${{ env.NODE_VERSION }}
2529
uses: actions/setup-node@v2
2630
with:
2731
node-version: ${{ env.NODE_VERSION }}
2832

33+
- id: get_version
34+
uses: battila7/get-version-action@v2
35+
2936
- name: show tag
3037
id: tag
3138
run: |
32-
echo ::set-output name=TAG::${GITHUB_REF##*/}
39+
echo ::set-output name=TAG::${{ steps.get_version.outputs.version-without-v }}
3340
3441
- name: publish package npm
3542
id: publish
36-
uses: JS-DevTools/npm-publish@v1
43+
uses: JS-DevTools/npm-publish@v3
3744
with:
3845
token: ${{ secrets.NPM_TOKEN }}
3946
tag: ${{ steps.tag.outputs.TAG }}
4047

4148
- if: steps.publish.outputs.type != 'none'
4249
run: |
43-
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
50+
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"

0 commit comments

Comments
 (0)