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 6, 2024
1 parent f33a849 commit 2f321d1
Show file tree
Hide file tree
Showing 15 changed files with 2,493 additions and 2,392 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

25 changes: 14 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,29 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

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

- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: Setup pnpm cache directory
run: pnpm config set store-dir $PNPM_CACHE_FOLDER

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: 'chore: update versions'
title: 'chore: update versions'
publish: pnpm ci:publish
- name: Publish packages
working-directory: .
run: |
npm config set //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
CWD=`pwd`
cd $CWD/packages/eslint/eslint-config-base && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/packages/eslint/eslint-config-node && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/packages/eslint/eslint-config-prettier && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/packages/eslint/eslint-config-typescript && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/packages/prettier/prettier-config && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD
env:
PUBLISH_COMMAND: ${{ contains(github.ref, 'beta') && 'publish --tag beta' || 'publish' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@
"description": "Smartlook common config 🪢",
"private": "true",
"license": "MIT",
"scripts": {
"ci:version": "changeset version",
"ci:publish": "changeset publish",
"bump": "changeset"
},
"scripts": {},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
},
"devDependencies": {
"@changesets/cli": "2.26.1",
"@commitlint/cli": "17.6.1",
"@commitlint/config-conventional": "17.6.1",
"husky": "8.0.3"
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint/eslint-config-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @smartlook/eslint-config-base

## 1.7.0

### Major Changes

- publish to github registry

## 1.6.0

### Minor Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/eslint/eslint-config-base/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@smartlook/eslint-config-base",
"description": "Smartlook ESLint base configuration",
"version": "1.6.0",
"version": "1.7.0",
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality",
"directory": "packages/eslint/eslint-config-base"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint/eslint-config-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @smartlook/eslint-config-node

## 1.6.0

### Major Changes

- publish to github registry

## 1.5.0

### Minor Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/eslint/eslint-config-node/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@smartlook/eslint-config-node",
"description": "Smartlook ESLint configuration for Node.js",
"version": "1.5.0",
"version": "1.6.0",
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality",
"directory": "packages/eslint/eslint-config-node"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint/eslint-config-prettier/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @smartlook/eslint-config-prettier

## 1.6.0

### Major Changes

- publish to github registry

## 1.5.0

### Minor Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/eslint/eslint-config-prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@smartlook/eslint-config-prettier",
"description": "Smartlook ESLint configuration for Prettier",
"version": "1.5.0",
"version": "1.6.0",
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality",
"directory": "packages/eslint/eslint-config-prettier"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint/eslint-config-typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @smartlook/eslint-config-typescript

## 1.7.0

### Major Changes

- publish to github registry

## 1.6.0

### Minor Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/eslint/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@smartlook/eslint-config-typescript",
"description": "Smartlook ESLint configuration for TypeScript",
"version": "1.6.0",
"version": "1.7.0",
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality",
"directory": "packages/eslint/eslint-config-typescript"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
Expand Down
6 changes: 6 additions & 0 deletions packages/prettier/prettier-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @smartlook/prettier-config

## 1.5.0

### Major Changes

- publish to github registry

## 1.4.1

### Patch Changes
Expand Down
8 changes: 5 additions & 3 deletions packages/prettier/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@smartlook/prettier-config",
"description": "Smartlook Prettier configuration",
"version": "1.4.1",
"version": "1.5.0",
"license": "MIT",
"main": "index.js",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"engines": {
"node": "^14 || >=16"
},
"homepage": "https://github.com/smartlook/code-quality#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/smartlook/code-quality.git"
"url": "https://github.com/smartlook/code-quality",
"directory": "packages/prettier/prettier-config"
},
"bugs": {
"url": "https://github.com/smartlook/code-quality/issues"
Expand Down
Loading

0 comments on commit 2f321d1

Please sign in to comment.