Skip to content

Commit

Permalink
ci: try adding tag input
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Apr 28, 2023
1 parent e94e7f5 commit 5098cd9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Publish Release

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to use. Has to start with extra char like "v"'
default: 'v'
type: string
required: true
release:
types: [created]

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

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

Expand Down

0 comments on commit 5098cd9

Please sign in to comment.