Skip to content

Commit 347eb18

Browse files
Merge pull request #7 from garydavisonos/hotfix/gd/build-workflow
Hotfix/gd/build workflow
2 parents acc53b2 + a741be8 commit 347eb18

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
node-version: "18.x"
1919
registry-url: "https://registry.npmjs.org/"
2020

21+
- name: Authenticate with npm
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
25+
2126
- name: Install dependencies
2227
run: npm ci --legacy-peer-deps
2328

@@ -27,6 +32,9 @@ jobs:
2732
- name: Build project
2833
run: npm run build
2934

35+
- name: Post build
36+
run: npm run postbuild
37+
3038
- name: Publish to npm
3139
run: npm publish
3240
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
dist/
3+
.DS_Store

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "conditional-helpers",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A collection of JavaScript helper functions to be used in conditional logic within projects",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"test": "jest",
99
"lint": "eslint .",
10-
"build": "tsc"
10+
"build": "tsc",
11+
"postbuild": "mv dist/index.* ./"
1112
},
1213
"repository": {
1314
"type": "git",
@@ -46,6 +47,8 @@
4647
},
4748
"type": "module",
4849
"files": [
49-
"dist"
50+
"index.d.ts",
51+
"index.js",
52+
"README.md"
5053
]
5154
}

0 commit comments

Comments
 (0)