-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from aspida/ci
ci: setup
- Loading branch information
Showing
8 changed files
with
216 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# 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://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
versioning-strategy: "increase" | ||
commit-message: | ||
prefix: "chore" | ||
prefix-development: "chore" | ||
include: "scope" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- | ||
Thank you for your contribution! 👍 | ||
--> | ||
|
||
## Types of changes | ||
|
||
- [ ] Bug fixes | ||
- resolves #<!-- Please add issue number --> | ||
- [ ] Features | ||
- resolves #<!-- Please add issue number --> | ||
- [ ] Maintenance | ||
- [ ] Documentation | ||
|
||
## Changes | ||
|
||
- ... | ||
|
||
|
||
## Additional context | ||
|
||
|
||
## Community note | ||
|
||
<!-- Please keep this section. --> | ||
|
||
Please upvote with reacting as :+1: to express your agreement. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
- title: '📚 Documentation' | ||
label: 'documentation' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
- 'feature' | ||
patch: | ||
labels: | ||
- 'patch' | ||
- 'fix' | ||
- 'chore' | ||
- 'documentation' | ||
default: patch | ||
template: | | ||
## Changes | ||
$CHANGES | ||
autolabeler: | ||
- label: 'chore' | ||
files: | ||
- '*.md' | ||
branch: | ||
- '/chore\b/' | ||
title: | ||
- '/\bchore\b/i' | ||
body: | ||
- '/^- \[x\] Maintenance/m' | ||
- label: 'documentation' | ||
files: | ||
- '*.md' | ||
branch: | ||
- '/docs?\b/' | ||
title: | ||
- '/\bdocs\b/i' | ||
body: | ||
- '/^- \[x\] Documentation/m' | ||
- label: 'bug' | ||
branch: | ||
- '/fix\b/' | ||
- '/bug\b/' | ||
title: | ||
- '/\bfix\b/i' | ||
- '/\bbug\b/i' | ||
body: | ||
- '/^- \[x\] Bug fixes/m' | ||
- label: 'feature' | ||
branch: | ||
- '/feature\b/' | ||
- '/feat\b.+/' | ||
title: | ||
- '/\bfeature\b/' | ||
- '/\bfeat\b/' | ||
body: | ||
- '/^- \[x\] Features/m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Node.js CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: "Test on Node:${{ matrix.node-version }} OS:${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: [12, 14, 16] | ||
os: [ubuntu-latest] | ||
include: | ||
- os: windows-latest | ||
node-version: 14 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: "node_modules" | ||
key: ${{ runner.os }}-node-v${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }} | ||
- run: yarn --frozen-lockfile | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
- run: yarn typecheck | ||
- run: yarn test | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
registry-url: "https://registry.npmjs.org" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: "node_modules" | ||
key: ${{ runner.os }}-node-v12-yarn-${{ hashFiles('yarn.lock') }} | ||
- run: yarn --frozen-lockfile | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
- run: | | ||
VERSION="$(node -e 'console.log(process.argv[1].match(/^refs\/tags\/v(\d+\.\d+\.\d+)$/)[1])' "${{ github.ref }}")" | ||
node -e 'console.log(JSON.stringify({...require("./package.json"),version:process.argv[1]}, null, 2))' "$VERSION" | tee ./tmp-package.json | ||
mv ./tmp-package.json ./package.json | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
disable-releaser: true | ||
disable-autolabeler: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
with: | ||
disable-releaser: false | ||
disable-autolabeler: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters