From a6bf120dc22b3bfd9a1c39ffb9d69bd1fbda2b2e Mon Sep 17 00:00:00 2001 From: Tobias Buschor Date: Tue, 28 Mar 2023 09:05:33 +0200 Subject: [PATCH] add npm-files --- .github/workflows/release-package.yml | 33 +++++++++++++++++++++++++++ .npmrc | 1 + package-lock.json | 14 ++++++++++++ package.json | 22 +++++++++++++++--- 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release-package.yml create mode 100644 .npmrc create mode 100644 package-lock.json diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml new file mode 100644 index 0000000..e26f7e2 --- /dev/null +++ b/.github/workflows/release-package.yml @@ -0,0 +1,33 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..47a094b --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@tobias_buschor:registry=https://npm.pkg.github.com \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a36ff43 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,14 @@ +{ + "name": "j-schema", + "version": "1.1.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "j-schema", + "version": "1.1.1", + "license": "MIT", + "devDependencies": {} + } + } +} diff --git a/package.json b/package.json index 38914b8..76c27f3 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,25 @@ "name": "j-schema", "description": "JSONSchema handling / validator", "version": "1.1.1", - "dependencies": {}, "devDependencies": {}, "publishConfig": { - "registry": "https://npm.pkg.github.com" - }, + "@tobias_buschor:registry": "https://npm.pkg.github.com" + }, + "main": "schema.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nuxodin/schema.js.git" + }, + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/nuxodin/schema.js/issues" + }, + "homepage": "https://github.com/nuxodin/schema.js#readme" }