From 8adacf9861a2014a80fa42be3ee3053001f95d28 Mon Sep 17 00:00:00 2001 From: naporin0624 Date: Tue, 31 Oct 2023 01:23:58 +0900 Subject: [PATCH] chore: ci publish --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2f33084 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - uses: pnpm/action-setup@v2 + with: + version: 8 + - run: pnpm install + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 4058c23..72c0e60 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "build": "tsup src/index.ts", "lint": "eslint -c .eslintrc.yml", "publint": "publint", - "prepublishOnly": "pnpm run build" + "prepublishOnly": "pnpm run build", + "release": "changeset publish" }, "files": [ "dist"