Skip to content

Commit

Permalink
Publish node REST client library as a GitHub Package
Browse files Browse the repository at this point in the history
  • Loading branch information
ushkarev committed Oct 9, 2023
1 parent 0e7b6cd commit a1dd0b3
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish-node-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish node REST client package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@ministryofjustice'
- name: Install dependencies
run: |
cd clients/node
npm clean-install --no-audit
- name: Run tests
run: |
cd clients/node
npm test
- name: Build package
run: |
cd clients/node
npm run clean
npm run build
- name: Publish package
run: |
cd clients/node
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions clients/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions clients/node/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "hmpps-non-associations-api",
"name": "@ministryofjustice/hmpps-non-associations-api",
"version": "0.0.0",
"private": false,
"description": "HMPPS Non-associations API REST client",
Expand All @@ -9,7 +9,10 @@
"url": "https://mojdigital.blog.gov.uk/"
},
"homepage": "https://github.com/ministryofjustice/hmpps-non-associations-api",
"repository": "git@github.com:ministryofjustice/hmpps-non-associations-api.git",
"repository": {
"type": "git",
"url": "git+https://github.com/ministryofjustice/hmpps-non-associations-api.git"
},
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit a1dd0b3

Please sign in to comment.