Skip to content

Commit

Permalink
build(architecture): 📦 add release yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cjinhuo committed Aug 31, 2024
1 parent 8b7a06f commit 49e3a96
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Animal Farm NodeJS CI
name: Checking CI
on:
push:
branches:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release on Merge to Master

on:
pull_request:
types: [closed]
branches:
- master

jobs:
build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 9
- name: Run Pnpm
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 49e3a96

Please sign in to comment.