Skip to content

Commit

Permalink
Merge pull request #8 from kanamone/changeset-release
Browse files Browse the repository at this point in the history
chore: ci publish
  • Loading branch information
himanoa authored Oct 30, 2023
2 parents 43e88cf + 8adacf9 commit c1556d5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c1556d5

Please sign in to comment.