Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sfawcett123/Instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Fawcett authored and Steven Fawcett committed Dec 10, 2022
2 parents ea8e3c2 + 8f9cc6b commit eb86656
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: Publish

on:
release:
types: [created]
push:
branches: [ "main" ]

jobs:
build:
Expand All @@ -18,19 +18,23 @@ jobs:
- run: npm ci
- run: |
npm install
gulp
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
npm run build
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main

- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ steps.package-version.outputs.current-version }}
message: "Latest release"
force_push_tag: true

- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit eb86656

Please sign in to comment.