Skip to content

Commit 2ae390a

Browse files
authored
Merge pull request #45 from AckeeCZ/chore/36-add-npm-publish
πŸ‘· Add npm package publishing pipeline
2 parents 58c60c2 + a977da4 commit 2ae390a

5 files changed

Lines changed: 48 additions & 1 deletion

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
uses: AckeeCZ/create-node-app/.github/workflows/build.yml@main
10+
11+
publish:
12+
needs: "build"
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
registry-url: https://registry.npmjs.org
24+
25+
- name: Install dependencies
26+
run: npm ci --ignore-scripts
27+
28+
- name: Build project
29+
run: npm run build
30+
31+
- name: Publish to npm
32+
run: npm publish --provenance
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
22
tsconfig.tsbuildinfo
3+
lib

β€Ž.npmignoreβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
./src
2+
.github
3+
./tsconfig.json
4+
./tsconfig.tsbuildinfo
5+
./prettier.config.cjs
6+
./eslintrc.cjs
7+
./logo.png
8+
./AUTHORS
9+
./package-lock.json

β€Ž.npmrcβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
message="πŸ”– %s"
2+
tag-version-prefix=""
3+
preid="beta"

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "create-node-app",
2+
"name": "@ackee/create-node-app",
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",

0 commit comments

Comments
Β (0)