Skip to content

Commit

Permalink
Merge pull request #1126 from wantedly/chloe463/cd/changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
chloe463 authored Dec 15, 2023
2 parents 8675c6d + 3aa88d1 commit 997eaa4
Show file tree
Hide file tree
Showing 6 changed files with 643 additions and 458 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": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow creates a release PR if changesets is existing
# When the changesets PR is merged, it will create tags to Github and publish packages.
name: Create Release Pull Request

on:
push:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
create-release-pr:
name: Create Release PR
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x

- run: yarn install --frozen-lockfile
- run: yarn lerna bootstrap
- run: yarn build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "3.2.2",
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
16 changes: 3 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"author": "Yuki Yamada <[email protected]>",
"license": "MIT",
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@types/eslint": "^8.44.8",
"@types/estree": "^1.0.5",
"@types/graphql": "^14.5.0",
"@types/jest": "^27.4.0",
"jest": "^29.7.0",
"lerna": "^4.0.0",
"lerna-changelog": "^1.0.1",
"mock-fs": "^5.0.0",
"pacote": "^11.3.4",
"scaffdog": "^1.0.1",
Expand All @@ -33,21 +34,10 @@
"test:update": "lerna run --stream test -- -u",
"lint": "frolint --branch master",
"lint:ci": "frolint --expect-no-errors",
"changelog": "yarn --silent lerna-changelog | cat - CHANGELOG.md | yarn --silent prettier --stdin-filepath CHANGELOG.md > CHANGELOG_BACKUP.md; mv CHANGELOG_BACKUP.md CHANGELOG.md",
"build": "lerna run build",
"build:watch": "lerna run --parallel build:watch",
"prerelease": "yarn install --force && yarn run build",
"release": "lerna publish --force-publish --preid beta --pre-dist-tag beta",
"release": "yarn changeset publish",
"clean": "yarn lerna clean -y && rm -r packages/*/lib"
},
"changelog": {
"repo": "wantedly/frolint",
"labels": {
"enhancement": "New feature or improvement",
"bug": "Bug fix",
"documentation": "Improve documentation",
"dependencies": "Update dependencies"
},
"cacheDir": ".changelog"
}
}
Loading

0 comments on commit 997eaa4

Please sign in to comment.