forked from materialsproject/mp-react-components
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 875 Bytes
/
publish-npm.yml
File metadata and controls
36 lines (36 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: publish-npm
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/setup-node@v1
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
with:
node-version: '12.x'
registry-url: https://registry.npmjs.org/
scope: '@mat-github-ci'
- name: Install dependencies
run: |
npm i
- name: Build project
run: |
npm run build-publish
- name: Publish to NPM
run: |
echo Publishing to test repo $NODE_AUTH_TOKEN
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}