Skip to content

Commit

Permalink
ci: Configure to publish to GH Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant59 committed Jul 1, 2024
1 parent ca13bde commit 46053e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 46053e4

Please sign in to comment.