Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marioparaschiv committed Dec 10, 2023
1 parent a60477f commit 3023055
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
pull_request:
push:
workflow_dispatch:
inputs:
release:
type: boolean
description: Publish release to NPM
default: false
version:
type: string
description: Package version
required: false

jobs:
build-windows:
Expand Down Expand Up @@ -114,3 +123,12 @@ jobs:
with:
name: hermesc-tarball
path: ./npm/hermesc/*.tgz

- name: NPM Publish
if: ${{ inputs.release == true }}
run: |
cd npm/hermesc
npm pkg set version=${{ inputs.version || github.ref_name }}
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 3023055

Please sign in to comment.