Skip to content

Commit

Permalink
ci(changeset): add releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Sep 11, 2023
1 parent 3df539d commit b754bdb
Show file tree
Hide file tree
Showing 5 changed files with 886 additions and 85 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Changesets PR or Publish

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
cache-dependency-path: 'pnpm-lock.yaml'
node-version-file: '.nvmrc'
- run: pnpm install --frozen-lockfile

- name: Set git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "Chung-il Jung"
- name: Create Changesets Pull Request or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
setupGitUser: false
title: 'chore: version packages'
commit: |
chore: version packages
Co-authored-by: Chung-il Jung <[email protected]>
Co-authored-by: Jonghyeon Ko <[email protected]>
version: pnpm changeset:version
publish: pnpm changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"changeset": "changeset",
"changeset:publish": "pnpm prepack && changeset publish",
"changeset:version": "changeset version && pnpm i --lockfile-only",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"graph": "rimraf ./graph && mkdir graph && turbo run build --graph=graph/index.html",
"lint": "turbo run lint",
Expand All @@ -31,6 +34,7 @@
"type:check": "turbo run type:check --parallel"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"eslint": "^7.32.0",
"packlint": "^0.2.4",
"prettier": "^2.5.1",
Expand Down
Loading

0 comments on commit b754bdb

Please sign in to comment.