Skip to content

Commit

Permalink
chore: add npm publish pipeline (#6)
Browse files Browse the repository at this point in the history
* chore: add npm publish pipeline

* chore: publish only if tests passed successfully
  • Loading branch information
roman-sainchuk authored Jan 5, 2022
1 parent feb2de7 commit afdbf69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 55 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/CI.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
name: Release to NPM

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# events but only for the main branch
on:
push:
tags:
- '*'
branches: [ main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -24,10 +23,10 @@ jobs:
- uses: actions/checkout@v2

# Set up Node
- name: Use Node 12
- name: Use Node 16
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 16
registry-url: 'https://registry.npmjs.org'

# Run install dependencies
Expand All @@ -44,5 +43,6 @@ jobs:

# Publish to npm
- run: npm publish --access public
if: ${{ success() }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit afdbf69

Please sign in to comment.