forked from nextauthjs/next-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add release script (nextauthjs#3891)
* chore: fix `next-auth` version in `package.json` * chore: add WIP publish script * chore: fix comments, add TODOs * chore: set newer TS target * chore: extract release config * chore: WIP work on publish script * chore: finish up release script * chore: do not push unless not dryRun * chore: add debug env var, return early if no package to update * chore: remove unnecessary comment * chore: remove changeset and unused dependencies * chore: drop `semantic-release` * chore: remove `jsonfile` dependency * chore: address code review * fix: list other commits in changelog when releasing * chore: fix env variable references * chore: fetch with tags and commit history * chore: fix analyze code * chore: fix utils script * chore: better changelog formatting * chore: fix package path * chore: fix some remaining stuff * chore: remove DEBUG flag
- Loading branch information
1 parent
8d410ab
commit 2e37105
Showing
17 changed files
with
782 additions
and
611 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ jobs: | |
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
cache: "yarn" | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Build | ||
run: npm run build | ||
|
@@ -44,20 +44,25 @@ jobs: | |
steps: | ||
- name: Init | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
cache: "yarn" | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Publish to npm and GitHub | ||
run: | | ||
cd packages/next-auth | ||
npx semantic-release@17 | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Balázs Orbán" | ||
yarn release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN_PKG: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN_ORG: ${{ secrets.NPM_TOKEN_ORG }} | ||
DRY_RUN: true | ||
release-pr: | ||
name: Publish PR | ||
runs-on: ubuntu-latest | ||
|
@@ -71,8 +76,8 @@ jobs: | |
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
cache: "yarn" | ||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
- name: Determine version | ||
uses: ./.github/version-pr | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# CHANGELOG | ||
|
||
The changelog is automatically updated using | ||
[semantic-release](https://github.com/semantic-release/semantic-release). You | ||
[scripts/release/index.ts](https://github.com/nextauthjs/next-auth/tree/main/scripts/index.ts). You | ||
can see it on the [releases page](../../releases). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,11 @@ | |
"version": "0.0.0", | ||
"private": true, | ||
"workspaces": { | ||
"packages": ["packages/*", "apps/dev", "docs"] | ||
"packages": [ | ||
"packages/*", | ||
"apps/dev", | ||
"docs" | ||
] | ||
}, | ||
"repository": "https://github.com/nextauthjs/next-auth.git", | ||
"scripts": { | ||
|
@@ -15,24 +19,29 @@ | |
"dev": "yarn dev:app", | ||
"dev:app": "turbo run dev --parallel --no-deps --no-cache --scope=next-auth-app", | ||
"dev:docs": "turbo run dev --parallel --no-deps --no-cache --scope=next-auth-docs", | ||
"version:pr": "node ./config/version-pr" | ||
"version:pr": "node ./config/version-pr", | ||
"release": "ts-node scripts/release" | ||
}, | ||
"devDependencies": { | ||
"@actions/core": "^1.6.0", | ||
"@changesets/cli": "^2.20.0", | ||
"@commitlint/parse": "16.0.0", | ||
"@types/semver": "7.3.9", | ||
"@typescript-eslint/eslint-plugin": "^5.10.2", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"conventional-changelog-conventionalcommits": "4.6.1", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-config-standard-with-typescript": "^21.0.1", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-jest": "^25.3.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"git-log-parser": "1.2.0", | ||
"husky": "^7.0.4", | ||
"prettier": "2.4.1", | ||
"pretty-quick": "^3.1.2", | ||
"semver": "7.3.5", | ||
"stream-to-array": "2.3.0", | ||
"ts-node": "10.5.0", | ||
"turbo": "^1.1.2", | ||
"typescript": "^4.5.2" | ||
}, | ||
|
@@ -44,7 +53,10 @@ | |
}, | ||
"eslintConfig": { | ||
"parser": "@typescript-eslint/parser", | ||
"extends": ["standard-with-typescript", "prettier"], | ||
"extends": [ | ||
"standard-with-typescript", | ||
"prettier" | ||
], | ||
"ignorePatterns": [ | ||
"node_modules", | ||
"next-env.d.ts", | ||
|
@@ -68,16 +80,26 @@ | |
}, | ||
"overrides": [ | ||
{ | ||
"files": ["./**/*test.js"], | ||
"files": [ | ||
"./**/*test.js" | ||
], | ||
"env": { | ||
"jest/globals": true | ||
}, | ||
"extends": ["plugin:jest/recommended"], | ||
"plugins": ["jest"] | ||
"extends": [ | ||
"plugin:jest/recommended" | ||
], | ||
"plugins": [ | ||
"jest" | ||
] | ||
} | ||
] | ||
}, | ||
"eslintIgnore": ["./*.d.ts", "**/tests", "**/__tests__"], | ||
"eslintIgnore": [ | ||
"./*.d.ts", | ||
"**/tests", | ||
"**/__tests__" | ||
], | ||
"packageManager": "[email protected]", | ||
"funding": [ | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.