Skip to content

Commit 0df8944

Browse files
committed
chore(git): adjusted the workflow and package
1 parent c9bec81 commit 0df8944

File tree

3 files changed

+64
-101
lines changed

3 files changed

+64
-101
lines changed

.github/workflows/ci.yml

-97
This file was deleted.

.github/workflows/npmpublish.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Node.js Package
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- Release
8+
push:
9+
branches:
10+
- master
11+
- Release
12+
- refs/tags/*
13+
tags:
14+
- '*'
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v1
21+
- uses: actions/setup-node@v1
22+
with:
23+
node-version: 10
24+
- run: yarn install
25+
- run: yarn lint
26+
- run: yarn build
27+
- run: yarn test
28+
29+
publish-npm:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
if: startsWith(github.ref, 'refs/tags')
35+
- uses: actions/setup-node@v1
36+
if: startsWith(github.ref, 'refs/tags')
37+
with:
38+
node-version: 10
39+
registry-url: https://registry.npmjs.org/
40+
- run: yarn install && yarn build && yarn publish
41+
if: startsWith(github.ref, 'refs/tags')
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}
44+
45+
publish-gpr:
46+
needs: build
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v1
50+
if: startsWith(github.ref, 'refs/tags')
51+
- uses: actions/setup-node@v1
52+
if: startsWith(github.ref, 'refs/tags')
53+
with:
54+
node-version: 10
55+
registry-url: https://npm.pkg.github.com/
56+
scope: '@hmcts'
57+
- run: yarn install && yarn build && yarn publish
58+
if: startsWith(github.ref, 'refs/tags')
59+
env:
60+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "http-proxy-middleware",
2+
"name": "@hmcts/http-proxy-middleware",
33
"version": "2.0.1",
44
"description": "The one-liner node.js proxy middleware for connect, express and browser-sync",
55
"main": "dist/index.js",
@@ -25,7 +25,7 @@
2525
},
2626
"repository": {
2727
"type": "git",
28-
"url": "https://github.com/chimurai/http-proxy-middleware.git"
28+
"url": "https://github.com/hmcts/http-proxy-middleware.git"
2929
},
3030
"keywords": [
3131
"reverse",
@@ -47,9 +47,9 @@
4747
"author": "Steven Chim",
4848
"license": "MIT",
4949
"bugs": {
50-
"url": "https://github.com/chimurai/http-proxy-middleware/issues"
50+
"url": "https://github.com/hmcts/http-proxy-middleware/issues"
5151
},
52-
"homepage": "https://github.com/chimurai/http-proxy-middleware#readme",
52+
"homepage": "https://github.com/hmcts/http-proxy-middleware#readme",
5353
"devDependencies": {
5454
"@commitlint/cli": "^12.1.4",
5555
"@commitlint/config-conventional": "^12.1.4",

0 commit comments

Comments
 (0)