Skip to content

Commit e23ae7f

Browse files
committed
Changed release workflow so that if the tag is already existing it will not create the tag
1 parent ea40fc5 commit e23ae7f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
jobs:
77
build:
88
name: Build and upload
@@ -48,12 +48,20 @@ jobs:
4848
path: lib
4949
- name: Display dirs
5050
run: ls -R
51+
- uses: Klemensas/action-autotag@1.2.3
52+
id: update_tag
53+
with:
54+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
55+
tag_prefix: "v"
5156
- name: Release
57+
if: steps.update_tag.outputs.tagname
5258
id: release-plugin
5359
uses: JS-DevTools/npm-publish@v2.2.0
5460
with:
5561
token: ${{ secrets.NPM_TOKEN }}
62+
strategy: upgrade
5663
- name: github-release
64+
if: steps.update_tag.outputs.tagname
5765
id: github-release
5866
env:
5967
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)