Skip to content

Commit e022f10

Browse files
authored
Create publish-npm-manual.yml
1 parent 6a738f6 commit e022f10

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: publish-npm-manual
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
logLevel:
6+
description: 'Log level'
7+
required: true
8+
default: 'warning'
9+
type: choice
10+
options:
11+
- info
12+
- warning
13+
- debug
14+
tags:
15+
description: 'manual publish'
16+
required: false
17+
type: boolean
18+
jobs:
19+
publish:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
with:
25+
ref: main
26+
- name: Set up Python 3.7
27+
uses: actions/setup-python@v1
28+
with:
29+
python-version: 3.7
30+
- uses: actions/setup-node@v1
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
33+
with:
34+
node-version: '12.x'
35+
registry-url: https://registry.npmjs.org/
36+
scope: '@mat-github-ci'
37+
- name: Install dependencies
38+
run: |
39+
npm i
40+
- name: Build project
41+
run: |
42+
npm run build-publish
43+
- name: Publish to NPM
44+
run: |
45+
echo Publishing to test repo $NODE_AUTH_TOKEN
46+
npm publish
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)