Skip to content

Commit

Permalink
refactor(actions): auto-publish package to npmjs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimyvgy committed Oct 13, 2022
1 parent f0718be commit b89f282
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/action.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to npmjs

on:
release:
types: [created]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: ⎔ Cache node_modules
uses: actions/cache@v3
env:
cache-name: node_modules-16x
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: 📥 Download deps
run: yarn install --frozen-lockfile
- name: ⎔ Build package
run: yarn build
- name: 🧶 Publish to npmjs
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

0 comments on commit b89f282

Please sign in to comment.