Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Create Github Workflow To Automate Publishing to NPM #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to NPM
on:
release:
types: [created]

jobs:
build:
runs-on: windows-2019 # the build errored out on windows-2022 (currently windows-latest)
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Add msbuild to PATH
uses: microsoft/[email protected]

- name: Build the C++ solution
run: |
msbuild ./AutomationTtsEngine.sln -v:diag -property:Configuration=Release

- name: Inspect build outputs
run: |
ls
cd Release/
ls

- name: Setup .npmrc file to publish to npm
uses: actions/setup-node@v3
with:
node-version: 18 # Exact version not important
registry-url: 'https://registry.npmjs.org'

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}