ci: add Github Actions

This commit is contained in:
unix
2020-03-19 02:04:41 +08:00
parent d14032c437
commit 8d3b09d779
7 changed files with 112 additions and 0 deletions

10
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,10 @@
ZEIT UI Contributing Guide
### Pull Request Guidelines
- Fork this repository to your own account. Do not create branches here.
- Commit info should be formatted by the [rules](https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/README.md).
- Rebase before creating a PR to keep commit history clear.
- Merging a PR takes two maintainers: one approves the changes after reviewing, and then the other reviews and merges.
### Code Style
Follow Lint

16
.github/ISSUE_TEMPLATE/1-bug-report.md vendored Normal file
View File

@@ -0,0 +1,16 @@
---
name: "Bug report 🐞"
about: "If something isn't working as expected 🤔."
---
# Bug report 🐞
## Version & Environment
## Expection
## Actual results (or Errors)

View File

@@ -0,0 +1,21 @@
---
name: "Feature request 🚀"
about: "I have a suggestion!"
---
# Feature request 🚀
### Expected:
- No breaking changes
### Examples:
```js
```
### Programme:
### Others:

8
.github/ISSUE_TEMPLATE/3-styles.md vendored Normal file
View File

@@ -0,0 +1,8 @@
---
name: "About `styles` 🛠️"
about: "Issues and feature requests for styles"
---
# About `styles` 🛠️

7
.github/ISSUE_TEMPLATE/4-docs.md vendored Normal file
View File

@@ -0,0 +1,7 @@
---
name: "About `docs` 🛠️"
about: "Issues and feature requests for docs"
---
# About `docs`

9
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,9 @@
## PR Checklist
- [ ] Fix linting errors
- [ ] Label has been added
## Change information

41
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Publish
on:
release:
types:
- published
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: checkout
uses: actions/setup-node@v1
with:
node-version: 12
- name: install
run: yarn install --check-files --frozen-lockfile
- name: lint
run: yarn lint
- name: build
run: yarn build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: checkout
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: install
run: yarn install --check-files --frozen-lockfile
- name: publish
run: yarn release
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}