Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit d49f9f3

Browse files
authored
Merge pull request #3 from chakra-ui/ci/release-workflow
ci: add release workflow
2 parents a7ec30f + a394810 commit d49f9f3

20 files changed

+1359
-55
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "chakra-ui/polymorphic" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/good-ducks-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@polymorphic-factory/react': minor
3+
---
4+
5+
Initial release
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Install'
2+
description: 'Sets up Node.js and runs install'
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install dependencies
8+
uses: pnpm/[email protected]
9+
with:
10+
version: 7
11+
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version-file: '.nvmrc'
16+
registry-url: 'https://registry.npmjs.org'
17+
cache: 'pnpm'
18+
19+
- name: Setup Git User
20+
shell: bash
21+
run: |
22+
git config --global user.email "[email protected]"
23+
git config --global user.name "Tim Kolberger"
24+
25+
- name: Install dependencies
26+
shell: bash
27+
run: pnpm install

.github/workflows/quality.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Quality
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout branch
14+
uses: actions/checkout@v3
15+
16+
- name: Install
17+
uses: ./.github/composite-actions/install
18+
19+
- name: Build packages
20+
run: pnpm build
21+
22+
tests:
23+
name: Tests
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout branch
27+
uses: actions/checkout@v3
28+
29+
- name: Install
30+
uses: ./.github/composite-actions/install
31+
32+
- name: Run tests
33+
run: pnpm test
34+
35+
eslint:
36+
name: ESLint
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout branch
40+
uses: actions/checkout@v3
41+
42+
- name: Install
43+
uses: ./.github/composite-actions/install
44+
45+
- name: Run ESLint
46+
run: pnpm lint
47+
48+
types:
49+
name: TypeScript
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout branch
53+
uses: actions/checkout@v3
54+
55+
- name: Install
56+
uses: ./.github/composite-actions/install
57+
58+
- name: Run typecheck
59+
run: pnpm typecheck
60+
61+
prettier:
62+
name: Prettier
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout branch
66+
uses: actions/checkout@v3
67+
68+
- name: Install
69+
uses: ./.github/composite-actions/install
70+
71+
- name: Run prettier
72+
run: pnpm format:check

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
paths:
6+
- '.changeset/**'
7+
- 'packages/**'
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout branch
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Install
25+
uses: ./.github/composite-actions/install
26+
27+
- name: Build
28+
run: pnpm build
29+
30+
- name: Create release Pull Request or publish to NPM
31+
id: changesets
32+
uses: changesets/action@v1
33+
with:
34+
publish: pnpm release
35+
commit: 'ci(changesets): version packages'
36+
setupGitUser: false
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Create @rc release
43+
if: steps.changesets.outputs.published != 'true'
44+
run: |
45+
git checkout main
46+
pnpm version:rc
47+
pnpm release:rc
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,5 @@ dist
283283

284284
# End of https://www.toptal.com/developers/gitignore/api/macos,node,visualstudiocode,intellij+all
285285

286-
.turbo
286+
.turbo
287+
*.backup

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.x

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Tim Kolberger
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# @polymorphic
1+
# @polymorphic-factory
22

33
## What's inside?
44

55
This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages:
66

77
### Packages
88

9+
- react
10+
911
### Build
1012

1113
To build all apps and packages, run the following command:

0 commit comments

Comments
 (0)