ci: update publish.yml

This commit is contained in:
Evo
2022-08-12 10:53:09 +05:30
committed by GitHub
parent b1190efee3
commit e7c50c4d32

View File

@@ -2,6 +2,18 @@ name: Publish
on:
workflow_dispatch:
inputs:
prNumber:
description: The number of the PR that is being deployed
required: true
version:
type: choice
description: The version that cli should be bumped to
options:
- major
- minor
- patch
required: true
jobs:
Publish:
@@ -28,6 +40,10 @@ jobs:
run: sern
- name: Publish to npm
run: npm publish
run: |
TAG=$(echo 'pr-${{ github.event.inputs.prNumber }}')
VERSION=$(echo '${{github.event.inputs.version}}')
npm version ${VERSION} --preid "${TAG}.$(git rev-parse --verify --short HEAD)" --git-tag-version=false
npm publish --tag ${TAG}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}