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 6, 2023
1 parent 05cc3ce commit c686435
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish-node-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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: Publish package
run: |
cd clients/node
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion clients/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"url": "https://mojdigital.blog.gov.uk/"
},
"homepage": "https://github.com/ministryofjustice/hmpps-non-associations-api",
"repository": "[email protected]:ministryofjustice/hmpps-non-associations-api.git",
"repository": {
"type": "git",
"url": "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 c686435

Please sign in to comment.