Skip to content

Commit 5098cd9

Browse files
committed
ci: try adding tag input
1 parent e94e7f5 commit 5098cd9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Publish Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to use. Has to start with extra char like "v"'
8+
default: 'v'
9+
type: string
10+
required: true
511
release:
612
types: [created]
713

@@ -21,8 +27,12 @@ jobs:
2127
run: npm ci --ignore-scripts --no-audit --progress=false
2228

2329
- name: Update version
30+
env:
31+
TAG: ${{ github.event.release.tag_name }}
32+
TAG_INPUT: ${{ inputs.tag }}
2433
run: |
25-
npm version --no-git-tag-version ${${{ github.event.release.tag_name }}:1}
34+
${TAG:=$TAG_INPUT}
35+
npm version --no-git-tag-version ${$TAG:1}
2636
sed -i -e "s/\"version\": *\"[0-9A-z.\-]*\"/\"version\": $(npm pkg get version)/gi" public/manifest.json
2737
# TODO: push version change to main
2838

0 commit comments

Comments
 (0)