setup releasing in CI
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
|
||||
"changelog": "@changesets/cli/changelog",
|
||||
"commit": false,
|
||||
"fixed": [],
|
||||
"linked": [],
|
||||
|
||||
34
.github/workflows/release.yml
vendored
Normal file
34
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# https://github.com/changesets/action#with-publishing
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: pnpm run release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
@@ -5,9 +5,9 @@
|
||||
"lint": "eslint --ext js,ts,tsx .",
|
||||
"lint-fix": "pnpm lint -- --fix",
|
||||
"format": "prettier --write .",
|
||||
"release": "pnpm -C packages/reacord run release",
|
||||
"build": "pnpm -C packages/website run build",
|
||||
"start": "pnpm -C packages/website run start"
|
||||
"build": "pnpm -r run build",
|
||||
"start": "pnpm -C packages/website run start",
|
||||
"release": "pnpm run build && changeset release"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.24.0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsup library/main.ts --target node16 --format cjs,esm --dts --sourcemap",
|
||||
"build": "cp ../../README.md . && cp ../../LICENSE . && tsup library/main.ts --target node16 --format cjs,esm --dts --sourcemap",
|
||||
"build-watch": "pnpm build -- --watch",
|
||||
"test": "vitest --coverage --no-watch",
|
||||
"test-dev": "vitest",
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
pnpm run build
|
||||
cp ../../README.md .
|
||||
cp ../../LICENSE .
|
||||
pnpm release-it
|
||||
Reference in New Issue
Block a user