Skip to content

Commit

Permalink
Merge pull request #13 from phun-ky/chore/workflow
Browse files Browse the repository at this point in the history
Chore/workflow
  • Loading branch information
phun-ky committed Oct 19, 2023
2 parents d5b9c4f + 4bcb362 commit 7f46fe2
Show file tree
Hide file tree
Showing 40 changed files with 2,973 additions and 73 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: phun-ky
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
64 changes: 64 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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 "check"
check:
# 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
notify:
name: Notify failed check
needs: check
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 }}


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
52 changes: 52 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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:
- 'src/**'
- 'api/**'
- 'public/**'
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@v4
with:
fetch-depth: 0 # Checkout all branches and tags
token: ${{ secrets.GH_TOKEN }}
- 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
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
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 }}

Loading

0 comments on commit 7f46fe2

Please sign in to comment.