Skip to content

Commit

Permalink
Added npm package publishing config
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Feb 10, 2024
1 parent a94b92c commit fa44090
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ jobs:
# selected operation systems to run CI
os: [ubuntu-latest] #, windows-latest, macos-latest]
# selected node version to run CI
node-version: [18.x]
node-version: [20.10.x]

steps:
- name: Check Out Repo
uses: actions/checkout@v3

- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
# use the node version defined in matrix above
node-version: ${{ matrix.node-version }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish to NPM
on: [workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.10.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci && npm run build

- name: Set public publishing
run: npm config set access public

- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 0 additions & 17 deletions docker-compose.yml

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "emmett",
"name": "@event-driven-io/emmett",
"version": "0.0.1",
"description": "Emmett - Event Sourcing made simple",
"scripts": {
Expand Down Expand Up @@ -28,16 +28,16 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/oskardudycz/emmett.git"
"url": "git+https://github.com/event-driven-io/emmett.git"
},
"keywords": [
"Event Sourcing"
],
"author": "Oskar Dudycz",
"bugs": {
"url": "https://github.com/oskardudycz/emmett/issues"
"url": "https://github.com/event-driven-io/emmett/issues"
},
"homepage": "https://github.com/oskardudycz/emmett#readme",
"homepage": "https://github.com/event-driven-io/emmett#readme",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit fa44090

Please sign in to comment.