From 46053e42db60480abe6f4f35b3905eeeb5c9303b Mon Sep 17 00:00:00 2001 From: Antony Derham Date: Mon, 1 Jul 2024 15:27:26 +0100 Subject: [PATCH] ci: Configure to publish to GH Packages --- .github/workflows/publish.yml | 17 ++++++++++------- package.json | 4 ++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86470d0..911c6f3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,18 +1,21 @@ -name: Publish Package to npmjs +name: Publish package on: - release: - types: [published] + push: + branches: + - main jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + packages: write 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" + registry-url: "https://npm.pkg.github.com" - run: npm ci - - run: npm publish --provenance --access public + - run: npm publish env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 804cb25..4f58d9f 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,10 @@ "version": "1.0.0", "private": true, "main": "eslint.config.mjs", + "repository": { + "type": "git", + "url": "https://github.com/Disruptive-Industries/eslint-config.git" + }, "peerDependencies": { "eslint": ">= 9" },