Skip to content

Commit

Permalink
ci: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlu-tw committed Mar 3, 2024
1 parent d67ee11 commit 700d049
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: release
on:
push:
branches:
- main
jobs:
release:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build packages
run: pnpm run build
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm run release
commit: "chore: new release"
title: "chore: new release candidate"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"prepare": "husky",
"modules:clean": "npx rimraf --glob ./**/node_modules && rm -rf pnpm-lock.yaml",
"pnpm:clean": "pnpm store prune",
"build": "turbo run build",
"check": "turbo run test lint --parallel",
"test": "turbo run test",
"lint": "turbo run lint",
"nuxt-demo": "pnpm --filter=@alanlu-dev/nuxt-demo",
"commit": "czg",
"changeset": "changeset",
"changeset:version": "changeset version",
"changeset:release": "changeset publish"
"version": "changeset version",
"release": "changeset publish"
},
"devDependencies": {
"@alanlu-dev/eslint-config": "workspace:*",
Expand Down

0 comments on commit 700d049

Please sign in to comment.