Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: publish to github registry #184

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store

jobs:
release:
timeout-minutes: 15
Expand All @@ -22,13 +23,17 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
registry-url: 'https://npm.pkg.github.com'
scope: '@smartlook'

- 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
run: |
echo "@smartlook:registry=https://npm.pkg.github.com" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc

- name: Setup pnpm cache directory
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
Expand All @@ -37,11 +42,15 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Create and publish versions
uses: changesets/action@v1
uses: Joozty/changeset-action@12197dbaeefe3b4fd22cbb4a9ec340c85a2641ec
with:
version: pnpm ci:version
commit: 'chore: update versions'
title: 'chore: update versions'
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOME: ${{ github.workspace }}
npm_config_registry: 'https://npm.pkg.github.com'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.DS_Store
node_modules
*.log
.npmrc
.pnpm-store
.npmrc
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
Loading