Skip to content

Commit 7aad18e

Browse files
committed
perf(semantic-release): added semantic release CI
1 parent 6bac6ad commit 7aad18e

File tree

12 files changed

+18204
-7686
lines changed

12 files changed

+18204
-7686
lines changed

.github/contributing.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Contributing to Transcriptase
2+
3+
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:
4+
5+
- Reporting a bug
6+
- Discussing the current state of the code
7+
- Submitting a fix
8+
- Proposing new features
9+
- Becoming a maintainer
10+
11+
## We Develop with Github
12+
13+
We use github to host code, to track issues and feature requests, as well as accept pull requests.
14+
15+
## We Use [Semantic Release](https://github.com/semantic-release/semantic-release)
16+
17+
We use semantic versioning for commit messages.
18+
19+
For commit messages, use semantig writing:
20+
21+
| Commit | Usage | Version |
22+
| -------------------------------------------------- | :--------------: | ------- |
23+
| fix(your-change): a small change, maybe just a fix | Fix Release | v.0.0.1 |
24+
| feat(your-change): a new feature, a medium change | Feature Release | v.0.1.0 |
25+
| perf(your-change): a breaking change or hotfix | Breaking Release | v.1.0.0 |
26+
27+
## We Use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow), So All Code Changes Happen Through Pull Requests
28+
29+
Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://docs.github.com/en/get-started/quickstart/github-flow)). We actively welcome your pull requests:
30+
31+
1. Fork the repo and create your branch from `main`.
32+
2. If you've added code that should be tested, add tests.
33+
3. If you've changed APIs or added new dependencies, update the documentation.
34+
4. Ensure the test suite passes.
35+
5. Make sure your code lints.
36+
6. Use semantic versioning for commits.
37+
7. Issue a pull request!
38+
39+
## Any contributions you make will be under the MIT Software License
40+
41+
In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
42+
43+
## Report bugs using Github's [issues](https://github.com/Se-Gl/greenCSS-frontend/issues)
44+
45+
We use GitHub issues to track public bugs. Report a bug by [opening a new issue](); it's that easy!
46+
47+
## Write bug reports with detail, background, and sample code
48+
49+
**Great Bug Reports** tend to have:
50+
51+
- A quick summary and/or background
52+
- Steps to reproduce
53+
- Be specific!
54+
- Give sample code if you can
55+
- What you expected would happen
56+
- What actually happens
57+
- Notes, Screenshots
58+
59+
People _love_ thorough bug reports. I'm not even kidding.
60+
61+
## Use a Consistent Coding Style
62+
63+
- You can try running `npm run lint` and `npm run prettier` for style unification
64+
65+
## License
66+
67+
By contributing, you agree that your contributions will be licensed under its MIT License.

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Title
2+
3+
## TL;DR
4+
5+
- Add
6+
- Things
7+
- That
8+
- Happened
9+
10+
## Details
11+
12+
TODO:
13+
14+
- [ ] N/A
15+
16+
Checklist / Reminders:
17+
18+
- [ ] Documentation is created / adapted
19+
- [ ] Cypress Tests

.github/workflows/prettier.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Styling
2+
3+
# Triggers the eslint workflow on push and pull request events
4+
on: [push, pull_request]
5+
6+
jobs:
7+
ESLint:
8+
name: Prettier run and fix
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
- name: Install npm dependencies
14+
run: npm install --force
15+
- name: Check files
16+
run: npm run prettier:check
17+
- name: Write files
18+
run: npm run prettier:format

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main, beta]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 16.x
19+
- name: Install dependencies
20+
run: npm install --force
21+
- name: Install semantic-release extra plugins
22+
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
23+
- name: Prettier format
24+
run: npm run prettier:format
25+
- name: Prettier check
26+
run: npm run prettier:check
27+
- name: Build
28+
run: npm run build
29+
- name: Release
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
run: npx semantic-release

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ yarn-error.log*
3131
# random
3232
.vercel
3333
.next
34-
.github
35-
.husky
34+

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run pre-commit && npm run success-message

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# SSR Modal Component
22

3-
[![Prettier](https://github.com/Se-Gl/modal-react/actions/workflows/prettier.yml/badge.svg)](https://github.com/Se-Gl/modal-react/actions/workflows/prettier.yml)
4-
[![Downloads p/week](https://badgen.net/npm/dw/modal-react)](https://badgen.net/npm/dw/modal-react)
5-
[![NPM version](https://badgen.net/npm/v/modal-react)](https://badgen.net/npm/v/modal-react)
6-
[![minified + gzip](https://badgen.net/bundlephobia/minzip/modal-react)](https://badgen.net/bundlephobia/minzip/modal-react)
7-
[![License](https://badgen.net/npm/license/modal-react)](https://badgen.net/npm/license/modal-react)
3+
[![Prettier](https://github.com/Se-Gl/next-modal/actions/workflows/prettier.yml/badge.svg)](https://github.com/Se-Gl/next-modal/actions/workflows/prettier.yml)
4+
[![Downloads p/week](https://badgen.net/npm/dw/next-modal)](https://badgen.net/npm/dw/next-modal)
5+
[![NPM version](https://badgen.net/npm/v/next-modal)](https://badgen.net/npm/v/next-modal)
6+
[![minified + gzip](https://badgen.net/bundlephobia/minzip/next-modal)](https://badgen.net/bundlephobia/minzip/next-modal)
7+
[![License](https://badgen.net/npm/license/next-modal)](https://badgen.net/npm/license/next-modal)
88

99
This is a sustainable React modal component project based on [greenCSS](https://github.com/Se-Gl/greenCSS), which also works SSR with Next.js. greenCSS is an animated, responsive, lightweight and sustainable CSS library. It is recommended that you also use greenCSS in your project. If you don't want to, just style your modal with your own classes.
1010

@@ -25,7 +25,7 @@ This is a sustainable React modal component project based on [greenCSS](https://
2525
First, install the Modal dependency:
2626

2727
```bash
28-
npm i modal-react
28+
npm i next-modal
2929
```
3030

3131
### Next.js
@@ -64,7 +64,7 @@ The following jsx file is based on greenCSS. If you don't want to use it, you ca
6464

6565
```js
6666
import React, { useState } from 'react'
67-
import { Modal } from 'modal-react'
67+
import { Modal } from 'next-modal'
6868

6969
export default function Home() {
7070
const [toggleModal, setToggleModal] = useState(false)

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
}

0 commit comments

Comments
 (0)