Skip to content

Commit f809408

Browse files
committed
fix: publish to GitHub package registry
1 parent a678a64 commit f809408

File tree

2 files changed

+10
-29
lines changed

2 files changed

+10
-29
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,13 @@ on:
55
branches:
66
- main
77

8-
env:
9-
NODE_VERSION: 16.x
10-
118
jobs:
12-
release-please:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Get package name
16-
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
17-
- uses: GoogleCloudPlatform/release-please-action@v2
18-
id: release
19-
with:
20-
token: ${{ secrets.BOT_TOKEN }}
21-
release-type: node
22-
package-name: ${{ env.PACKAGE_NAME }}
23-
bump-minor-pre-major: Yes
24-
- uses: actions/checkout@v2
25-
# These if statements ensure that a publication only occurs when a new release is created
26-
if: ${{ steps.release.outputs.release_created }}
27-
- uses: actions/setup-node@v2
28-
with:
29-
node-version: ${{ env.NODE_VERSION }}
30-
registry-url: 'https://registry.npmjs.org'
31-
if: ${{ steps.release.outputs.release_created }}
32-
- run: npm install
33-
if: ${{ steps.release.outputs.release_created }}
34-
- run: npm publish --access public
35-
env:
36-
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
37-
if: ${{ steps.release.outputs.release_created }}
9+
release:
10+
# Documentation: https://github.com/zakodium/workflows#release
11+
uses: zakodium/workflows/.github/workflows/release.yml@publish-scoped
12+
with:
13+
npm: true
14+
public: true
15+
secrets:
16+
github-token: ${{ secrets.BOT_TOKEN }}
17+
npm-token: ${{ secrets.NPM_BOT_TOKEN }}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "ESLint config for GraphQL files",
55
"main": "index.js",
66
"license": "MIT",
7+
"repository": "https://github.com/zakodium/eslint-config-graphql",
78
"scripts": {
89
"test": "node test/test.mjs"
910
},

0 commit comments

Comments
 (0)