Skip to content

Commit

Permalink
Merge pull request #32 from phun-ky/chore/30
Browse files Browse the repository at this point in the history
chore: 🤖 Add github actions
  • Loading branch information
phun-ky authored Sep 19, 2023
2 parents 8beafee + 1942f8d commit 06cd322
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'problems: bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore: 🤖 '
28 changes: 28 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
'section: workflows':
- .github/workflows/**
'section: repo':
- '*'
'experience: developer':
- 'dev'
- '.eslintignore'
- '.eslintrc.json'
- '.gitignore'
- '.npmrc'
- '.prettierrc'
- 'tslint.json'
- '.stylintrc'
- '.postcssrc.cjs'
- '.postcssrc.js'
'context: github':
- .github/**
'context: docker':
- Dockerfile
'context: npm':
- '.npmrc'
'context: rollup':
- 'rollup.config.js'
- 'rollup.*.config.js'
'mindless: docs':
- '**/*.md'
'mindless: dependencies':
- 'package-lock.json'
19 changes: 19 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto Assign
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: phun-ky
numOfAssignee: 1
55 changes: 55 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to help you get started with Actions

name: Checks

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
paths:
- 'src'
- 'package.json'
- 'package-lock.json'
- 'rollup.config.js'
- 'tsconfig.json'
- '.npmrc'
pull_request:
branches: [ "main" ]
types: [opened, synchronize] # Workflow triggering events
paths:
- 'src'
- 'package.json'
- 'package-lock.json'
- 'rollup.config.js'
- 'tsconfig.json'
- '.npmrc'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout all branches and tags
- name: Setup Node.js environment
uses: actions/setup-node@v2.5.2
with:
node-version: 18
- name: Install dependencies
run: | # Install and link dependencies
npm i
- name: Build # Build all packages
run: npm run build


15 changes: 15 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
sync-labels: true
dot: true
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: Publish

# Controls when the workflow will run
on:
pull_request:
types: [closed]
branches: [ "main" ]
paths:
- 'packages/**'
workflow_dispatch:
jobs:
publish:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Checkout all branches and tags
- name: Setup Node.js environment
uses: actions/setup-node@v2.5.2
with:
node-version: 18
- name: Install dependencies
run: | # Install and link dependencies
npm i
- name: "Release" # Interesting step
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
npm run release
notify:
name: Notify failed build
needs: publish
if: failure() && github.event.pull_request == null
runs-on: ubuntu-latest
steps:
- uses: jayqi/failed-build-issue-action@v1
with:
github-token: ${{ secrets.GH_TOKEN }}

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"git-cz": "^4.9.0",
"jest": "^26.6.3",
"network-information-types": "^0.1.1",
"postcss": "^8.3.0",
Expand All @@ -137,5 +138,10 @@
"stylus": "^0.56.0",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
},
"config": {
"commitizen": {
"path": "./node_modules/git-cz"
}
}
}

0 comments on commit 06cd322

Please sign in to comment.