Skip to content

Commit

Permalink
feat: canary workflow 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
appear committed Jun 9, 2024
1 parent 8eec532 commit 473cd2a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": [],
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}-{commit}"
}
}
31 changes: 31 additions & 0 deletions .github/workflows/canary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Canary Deployment

on:
issue_comment:
types: [created]

jobs:
canary-deploy:
if: github.event.issue.pull_request != null && contains(github.event.comment.body, '/release-canary')
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: setup pnpm and install dependencies
uses: pnpm/action-setup@v3
with:
version: 9.1.1
run_install: true

- name: setup pnpm and install dependencies
- run: pnpm run release:canary
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"url": "https://github.com/copiest/frontend-libraries.git"
},
"scripts": {
"build": "turbo run build"
"build": "turbo run build",
"release:canary": "pnpm build && changeset version --snapshot && pnpm publish --tag canary --no-git-checks"
},
"keywords": [],
"author": "@copiest",
Expand Down

0 comments on commit 473cd2a

Please sign in to comment.