chore: setup actions
This commit is contained in:
parent
a03f915338
commit
656ef25406
6 changed files with 129 additions and 0 deletions
3
.ctrc.yml
Normal file
3
.ctrc.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
git:
|
||||||
|
provider: github
|
||||||
|
project: AdeAttwood/DiffCov
|
||||||
23
.github/dependabot.yml
vendored
Normal file
23
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
|
||||||
|
- package-ecosystem: npm
|
||||||
|
versioning-strategy: increase
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "all"
|
||||||
|
commit-message:
|
||||||
|
prefix: "chore:"
|
||||||
|
assignees:
|
||||||
|
- "AdeAttwood"
|
||||||
|
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: weekly
|
||||||
|
commit-message:
|
||||||
|
prefix: 'chore:'
|
||||||
|
assignees:
|
||||||
|
- 'AdeAttwood'
|
||||||
29
.github/workflows/ci.yml
vendored
Normal file
29
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push: { branches: ["0.x"] }
|
||||||
|
pull_request: { branches: ["0.x"] }
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with: { node-version: 18 }
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
|
||||||
|
- name: Type Check
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test --coverage
|
||||||
18
.github/workflows/ct-commitlint.yml
vendored
Normal file
18
.github/workflows/ct-commitlint.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
name: Conventional Tools Commitlint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push: { branches: ["0.x"] }
|
||||||
|
pull_request: { branches: ["0.x"] }
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
commits:
|
||||||
|
name: Commitlint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: registry.k1.zportal.co.uk/practically-oss/conventional-tools:1.x
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with: {fetch-depth: 1000}
|
||||||
|
|
||||||
|
- name: Lint commits
|
||||||
|
run: conventional-tools commitlint -l1
|
||||||
29
.github/workflows/ct-release.yml
vendored
Normal file
29
.github/workflows/ct-release.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Conventional Tools Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Version'
|
||||||
|
required: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: registry.k1.zportal.co.uk/practically-oss/conventional-tools:1.x
|
||||||
|
env:
|
||||||
|
CT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
run: conventional-tools release-semver ${{ github.event.inputs.version }}
|
||||||
27
.github/workflows/publish-release.yml
vendored
Normal file
27
.github/workflows/publish-release.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: Publish Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["Conventional Tools Release"]
|
||||||
|
types: ["completed"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
|
- name: Install dependencies and build
|
||||||
|
run: yarn install && yarn build
|
||||||
|
|
||||||
|
- name: Publish package on NPM
|
||||||
|
run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
Loading…
Reference in a new issue