Skip to content

Commit

Permalink
Setting up npm publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarehart committed Dec 10, 2023
1 parent e3f485f commit cdfc2ae
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci --no-audit
- run: npm run lint --if-present
- run: npm test
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci --no-audit
- run: npm run lint --if-present
- run: npm test
- run: npm run build:release
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "node-typescript-boilerplate",
"version": "0.0.0",
"name": "aws-appconfig-poller",
"version": "0.0.2",
"description": "A wrapper around @aws-sdk/client-appconfigdata to provide background polling and caching.",
"repository": {
"type": "git",
"url": "https://github.com/tarehart/aws-appconfig-poller.git"
},
"type": "module",
"engines": {
"node": ">= 18.12 <19"
"node": ">= 18.12 <21"
},
"devDependencies": {
"@aws-sdk/credential-providers": "^3.470.0",
Expand Down Expand Up @@ -41,8 +45,5 @@
"dependencies": {
"@aws-sdk/client-appconfigdata": "^3.470.0",
"tslib": "~2.6"
},
"volta": {
"node": "18.12.1"
}
}

0 comments on commit cdfc2ae

Please sign in to comment.