diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml new file mode 100644 index 0000000..39f880a --- /dev/null +++ b/.github/workflows/npm.yaml @@ -0,0 +1,21 @@ +name: Publish to npmjs + +on: + push: + branches: ["main"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # 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 + - uses: JS-DevTools/npm-publish@v2.2.1 + with: + token: ${{ secrets.NPM_TOKEN }} + access: public diff --git a/package-lock.json b/package-lock.json index 17683c2..dad3a6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "replay-ranger", + "name": "@corsaircoalition/replay-ranger", "version": "2.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "replay-ranger", + "name": "@corsaircoalition/replay-ranger", "version": "2.0.0", "dependencies": { "@corsaircoalition/common": "^1.1.0", diff --git a/package.json b/package.json index 2f030db..bec3d5e 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { - "name": "replay-ranger", + "name": "@corsaircoalition/replay-ranger", "version": "2.0.0", "description": "record and replay generals.io game updates to Redis", - "private": true, "main": "out/index.js", "type": "module", "dependencies": {