From f6e15f122c419b640fb23d1d5a861837f5d3ef55 Mon Sep 17 00:00:00 2001 From: James Onnen Date: Mon, 14 Aug 2023 21:49:34 -0700 Subject: [PATCH] feat: Publish as NPM package --- .github/workflows/publish-package.yml | 16 ++++++++++++++-- package-lock.json | 13 +++++++++++++ package.json | 15 +++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 8039b27..e476936 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -1,4 +1,4 @@ -name : Publish system packages to registry +name: Publish system packages to registry on: release: types: [published] @@ -22,4 +22,16 @@ jobs: run: | mkdir -p ~/.wally echo "$WALLY_AUTH" > ~/.wally/auth.toml - wally publish \ No newline at end of file + wally publish + + - uses: actions/setup-node@v3 + with: + node-version: "16.x" + registry-url: "https://npm.pkg.github.com" + # Defaults to the user or organization that owns the workflow file + scope: "@octocat" + + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7f0e810 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "MockDataStoreService", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "MockDataStoreService", + "version": "1.0.0", + "license": "Apache 2.0" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..5caf134 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "mockdatastoreservice", + "version": "1.0.0", + "description": "Emulation of Roblox's DataStoreService for seamless offline development & testing", + "keywords": [ + "Roblox", + "Nevermore", + "Lua", + "DataStore" + ], + "license": "Apache 2.0", + "publishConfig": { + "access": "public" + } +} \ No newline at end of file