Skip to content

Commit

Permalink
Triage, CI and Publish GitHub Actions workflow (#38)
Browse files Browse the repository at this point in the history
* Added Triage, CI and Release workflow
* Added publish.yml
  • Loading branch information
fuxingloh authored Nov 12, 2020
1 parent abae97b commit 9783df1
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!--
Give a brief description of the pull request.
-->
7 changes: 7 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
addAssignees: author
addReviewers: true

reviewers:
- fuxingloh

numberOfReviewers: 1
3 changes: 3 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature: [ 'feature/*', 'feat/*', 'enhancement/*' ]
fix: [ 'fix/*', 'bug/*', 'bugfix/*' ]
chore: [ 'chore/*', 'docs/*' , 'doc/*', 'ci/*' ]
34 changes: 34 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- 'chore'
- 'docs'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
version-resolver:
minor:
labels:
- 'feature'
- 'enhancement'
patch:
labels:
- 'patch'
- 'bug'
- 'bugfix'
- 'fix'
default: patch
template: |
## Changes
$CHANGES
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
pull_request:
branches: [ master ]

jobs:
yarn:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- run: yarn install --frozen-lockfile
- run: yarn build
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish

on:
release:
types: [ published ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- run: yarn install --frozen-lockfile

- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
COMMIT_MESSAGE: 'release: update package version'

- run: yarn build

- run: yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches: [ master ]


jobs:
draft-release:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Triage"

on:
pull_request:
types: [ opened, reopened ]
branches: [ master ]

jobs:
triage:
name: Triage
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: kentaro-m/auto-assign-action@v1.1.2

0 comments on commit 9783df1

Please sign in to comment.