mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
ci: update publish.yml
This commit is contained in:
18
.github/workflows/publish.yml
vendored
18
.github/workflows/publish.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user