Skip to content

Commit 5b23dea

Browse files
committed
npmpublish workflow file
1 parent a3a7661 commit 5b23dea

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/npmpublish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Publish HttpSnippet Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "package.json"
9+
- "**.md"
10+
workflow_dispatch:
11+
inputs:
12+
logLevel:
13+
description: "Log level"
14+
required: true
15+
default: "warning"
16+
tags:
17+
description: "Test scenario tags"
18+
19+
jobs:
20+
publish-package:
21+
runs-on: ubuntu-latest
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
steps:
26+
- name: Checkout Repository
27+
uses: actions/checkout@v2
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Auth
32+
run: |
33+
git config --local user.email "action@github.com"
34+
git config --local user.name "GitHub Action"
35+
env:
36+
github_token: ${{secrets.ACTIONS_ACCESS_KEY}}
37+
38+
- name: Install node 14
39+
uses: actions/setup-node@v2
40+
with:
41+
node-version: 14.x
42+
registry-url: "https://npm.pkg.github.com"
43+
scope: "@rapidapi"
44+
45+
- name: Install yarn
46+
run: npm install -g yarn
47+
48+
- name: Install root dependencies
49+
run: yarn --no-progress --non-interactive --frozen-lockfile
50+
51+
- name: Publish Package
52+
run: npm publish
53+
env:
54+
NODE_AUTH_TOKEN: ${{secrets.ACTIONS_ACCESS_KEY}}

0 commit comments

Comments
 (0)