Skip to content

Commit

Permalink
feat: publish to github registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Joozty committed May 3, 2024
1 parent f33a849 commit 7d1bd48
Show file tree
Hide file tree
Showing 9 changed files with 2,380 additions and 1,726 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
registry-url: 'https://npm.pkg.github.com'

- name: Install pnpm
run: npm i pnpm@8 -g
run: npm i pnpm@9 -g

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Setup registry
working-directory: .
run: |
cat << EOF > "$HOME/.npmrc"
//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
@smartlook:registry=https://npm.pkg.github.com
EOF
- name: Setup pnpm cache directory
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
Expand All @@ -44,4 +50,4 @@ jobs:
title: 'chore: update versions'
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
node_modules
*.log
.npmrc
.pnpm-store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@smartlook:registry=https://npm.pkg.github.com
3 changes: 2 additions & 1 deletion packages/eslint/eslint-config-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint/eslint-config-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint/eslint-config-prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
Expand Down
3 changes: 2 additions & 1 deletion packages/eslint/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
Expand Down
3 changes: 2 additions & 1 deletion packages/prettier/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
Expand Down
Loading

0 comments on commit 7d1bd48

Please sign in to comment.