diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml new file mode 100644 index 0000000..d6f0eea --- /dev/null +++ b/.github/workflows/publish-github.yml @@ -0,0 +1,22 @@ +name: Publish package to GitHub Packages +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to GitHub Packages + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://npm.pkg.github.com" + scope: "@oconva" + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..86470d0 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,18 @@ +name: Publish Package to npmjs +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index ccb0112..c5b4bd8 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,10 @@ }, "name": "qvikchat", "version": "1.0.0", + "repository": { + "type": "git", + "url": "https://github.com/oconva/qvikchat.git" + }, "keywords": [ "conversational ai", "chat",