mirror of
https://github.com/noodlapp/noodl-cloudservice.git
synced 2026-01-10 14:22:52 +01:00
feat: Add publish npm GH workflow (#7)
This commit is contained in:
39
.github/workflows/publish-npm.yml
vendored
Normal file
39
.github/workflows/publish-npm.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Publish to NPM
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||||
|
concurrency:
|
||||||
|
group: "publish-npm"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: packages/noodl-cloudservice
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup node env 🏗
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
|
- name: Install dependencies 🏗
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: npm publish --access=public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
Reference in New Issue
Block a user