Skip to content

Commit

Permalink
feature(ops): setup renovate, CI builds (#10)
Browse files Browse the repository at this point in the history
* feature(ops): setup renovate, CI builds

* feature(ops): added release drafter

* feature(ops): update governance

* feature(ops): update governance
  • Loading branch information
thedoublejay authored Jul 24, 2023
1 parent 05620ad commit df1fb68
Show file tree
Hide file tree
Showing 12 changed files with 487 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Thanks for sending a pull request! -->

#### What this PR does / why we need it:

#### Which issue(s) does this PR fixes?:

<!--
(Optional) Automatically closes linked issue when PR is merged.
Usage: `Fixes #`, or `Fixes (paste link of issue)`.
-->

Fixes #

#### Additional comments?:

#### Developer Checklist:

<!--
Merging into the main branch implies your code is ready for production.
Before requesting for code review, please ensure that the following tasks
are completed. Otherwise, keep the PR drafted.
-->

- [ ] Read your code changes at least once
- [ ] No console errors
- [ ] Unit tests\*
- [ ] Added e2e tests\*

<!--
* If applicable
-->
22 changes: 22 additions & 0 deletions .github/oss-governance-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: OSS Governance

on:
pull_request_target:
types: [synchronize, opened, labeled, unlabeled]
issues:
types: [opened, labeled, unlabeled]
issue_comment:
types: [created]

permissions:
contents: read
issues: write
pull-requests: write
statuses: write
checks: write

jobs:
Bot:
runs-on: ubuntu-latest
steps:
- uses: BirthdayResearch/oss-governance-bot@37c8583c6b8596d173b68ffaed543e2485f4f193 # v3.0.0
20 changes: 20 additions & 0 deletions .github/oss-governance-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: OSS Governance

on:
pull_request_target:
types: [opened, edited, synchronize]

permissions:
contents: read
issues: write
pull-requests: write
statuses: write
checks: write

jobs:
Labeler:
runs-on: ubuntu-latest
steps:
- uses: fuxingloh/multi-labeler@6704db0bcba106d07482efabbc79d3092af74fa2 # v2.0.3
with:
config-path: .github/labeler.yml
22 changes: 22 additions & 0 deletions .github/oss-governance-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: OSS Governance

on:
push:
branches: [main]
paths: [.github/labels.yml]

permissions:
contents: read
issues: write

jobs:
Labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # tag=v1.3.0
with:
prune: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "kind/feature"
- title: "🐛 Bug Fixes"
labels:
- "kind/fix"
- title: "Maintenance"
labels:
- "kind/refactor"
- "kind/chore"
- "kind/docs"
- title: "Dependencies"
labels:
- "kind/dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&'
version-resolver:
minor:
labels:
- "kind/feature"
default: patch
template: |
## What’s Changed
$CHANGES
3 changes: 3 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["github>waveshq/standard//renovate-config/web"]
}
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflows }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint - Typescript and ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- run: corepack enable pnpm
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- run: pnpm lint

build:
name: "Build (Apps & Packages)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- run: corepack enable pnpm
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
with:
node-version-file: ".nvmrc"
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm build
126 changes: 126 additions & 0 deletions .github/workflows/governance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
version: v1

issue:
labels:
- prefix: triage
list: ["accepted"]
multiple: false
author_association:
collaborator: true
member: true
owner: true
needs:
comment: |
@$AUTHOR: Thanks for opening an issue, it is currently awaiting triage.
The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.
- prefix: kind
list:
- feature
- bug
- question
- fix
- chore
- docs
- refactor
- dependencies
multiple: false
needs: true
author_association:
author: true
collaborator: true
member: true
owner: true

- prefix: area
list:
- core
- workflow
- docs
multiple: true
needs:
comment: |
@$AUTHOR: There are no 'area' labels on this issue. Adding an appropriate label will greatly expedite the process for us. You can add as many area as you see fit. **If you are unsure what to do you can ignore this!**
You can add area labels by leaving a `/area` comment.
author_association:
author: true
collaborator: true
member: true
owner: true

- prefix: priority
multiple: true
list: ["urgent-now", "important-soon", "low"]
needs:
comment: |
@$AUTHOR: Thanks for opening an issue, an appropriate priority will be added soon.
The priority labels can be added by foundation members by writing /priority [type] in a comment.
author_association:
collaborator: true
member: true
owner: true

chat_ops:
- cmd: /close
type: close
author_association:
author: true
collaborator: true
member: true
owner: true

- cmd: /duplicate
type: close
author_association:
collaborator: true
member: true
owner: true

- cmd: /duplicate
type: comment
comment: |
@$ISSUE_AUTHOR: This issue has been marked duplicate by @$AUTHOR, if you think this is a mistake, please reopen it!
author_association:
collaborator: true
member: true
owner: true

- cmd: /duplicate
type: label
label:
add: duplicate
author_association:
collaborator: true
member: true
owner: true

- cmd: /cc
type: none

- cmd: /assign
type: assign
author_association:
collaborator: true
member: true
owner: true

captures:
- regex: '\W*v?(\d+\.\d+\.\d+)\W*'
github_release: true
ignore_case: true
label: "version/$CAPTURED"

- regex: '\W*Mac\W*'
label: "platform/mac"
ignore_case: true

- regex: '\W*Windows\W*'
label: "platform/windows"
ignore_case: true

- regex: '\W*Linux\W*'
label: "platform/linux"
ignore_case: true
57 changes: 57 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
version: v1

labels:
- label: kind/feature
sync: true
matcher:
title: "^feature\\(.+\\): .+"

- label: kind/feature
sync: true
matcher:
title: "^feat\\(.+\\): .+"

- label: kind/fix
sync: true
matcher:
title: "^fix\\(.+\\): .+"

- label: kind/chore
sync: true
matcher:
title: "^chore\\(.+\\): .+"

- label: kind/refactor
sync: true
matcher:
title: "^refactor\\(.+\\): .+"

- label: kind/docs
sync: true
matcher:
title: "^docs\\(.+\\): .+"

- label: kind/dependencies
sync: true
matcher:
title: "^bump(\\(.+\\))?: .+"

- label: kind/dependencies
sync: true
matcher:
title: "^build(\\(.+\\))?: .+"

checks:
- context: "Semantic Pull Request"
url: "https://github.com/JellyfishSDK/jellyfish/blob/main/.github/labeler.yml"
description:
success: Ready for review & merge.
failure: "Missing semantic title or label for merge [kind(directory): title]"
labels:
any:
- kind/feature
- kind/fix
- kind/chore
- kind/refactor
- kind/docs
- kind/dependencies
Loading

0 comments on commit df1fb68

Please sign in to comment.