Skip to content

Commit 00d231c

Browse files
committed
Setup for NPM package publishing
1 parent 3a1da81 commit 00d231c

File tree

3 files changed

+45
-17
lines changed

3 files changed

+45
-17
lines changed

.github/workflows/npm.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ jobs:
4545
with:
4646
artifacts: dist/layer.zip
4747
token: ${{ secrets.GITHUB_TOKEN }}
48+
- name: NPM Publish
49+
if: github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
50+
env:
51+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
run: |
53+
npm version from-git
54+
npm publish --registry=https://registry.npmjs.org

package-lock.json

Lines changed: 32 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
22
"name": "s3-upload-custom-resource-lambda-layer",
33
"version": "1.0.0",
4-
"author": "Dustin Toff",
4+
"author": "Dustin Toff <me@dustintoff.com> (https://dustintoff.com)",
55
"license": "Apache-2.0",
6+
"homepage": "https://github.com/quittle/s3-upload-custom-resource-lambda-layer",
67
"engines": {
78
"node": "=12.14.1"
89
},
10+
"files": [
11+
"dist/layer.zip"
12+
],
913
"scripts": {
1014
"build": "webpack",
1115
"test": "npm run unit-test && npm run integration-test",
@@ -36,9 +40,7 @@
3640
"ts-loader": "^8.1.0",
3741
"typescript": "^4.2.3",
3842
"webpack": "^5.30.0",
39-
"webpack-cli": "^4.6.0"
40-
},
41-
"dependencies": {
43+
"webpack-cli": "^4.6.0",
4244
"aws-sdk": "^2.878.0",
4345
"deepmerge": "^4.2.2",
4446
"minimatch": "^3.0.4"

0 commit comments

Comments
 (0)