From 5ff23445e6bdc7fc8bb62beeb34bf6114ee5cc9b Mon Sep 17 00:00:00 2001 From: Peter Salomonsen Date: Sun, 12 Nov 2023 13:50:04 +0000 Subject: [PATCH] release: publish to npm --- .github/workflows/npm-publish.yml | 25 +++++++++++++++++++++++++ package.json | 16 ++++++++++++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..f7b9b6b --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,25 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + publish-gpr: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + - run: yarn install + - run: yarn prod + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/package.json b/package.json index cee6890..ac440ad 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,16 @@ { - "name": "frontend", - "version": "0.18.2", - "homepage": "/", - "private": true, + "name": "@petersalomonsen/near-bos-webcomponent", + "version": "0.0.1", + "homepage": "https://github.com/petersalomonsen/near-bos-webcomponent", + "repository": { + "type": "git", + "url": "https://github.com/petersalomonsen/near-bos-webcomponent.git" + }, + "files": [ + "dist/", + "README.md", + "LICENSE" + ], "dependencies": { "@braintree/sanitize-url": "^6.0.2", "big.js": "^6.1.1",