generated from MapColonies/ts-npm-package-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e1a797
commit 9864064
Showing
18 changed files
with
4,478 additions
and
7,860 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
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,21 @@ | ||
name: init-npm | ||
description: 'Initialize the repo with npm and install all the dependencies' | ||
inputs: | ||
node-version: | ||
description: 'Node.js version' | ||
required: true | ||
default: '20.x' | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: npm | ||
- name: Install TS Project dependencies | ||
shell: bash | ||
run: npm ci | ||
- name: build | ||
shell: bash | ||
run: npm run build |
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,54 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json | ||
version: 2 | ||
updates: | ||
# deps | ||
- package-ecosystem: npm | ||
schedule: | ||
interval: weekly | ||
allow: | ||
- dependency-type: production | ||
directory: / | ||
commit-message: | ||
prefix: "build(deps)" | ||
groups: | ||
map-colonies: | ||
patterns: | ||
- "@map-colonies/*" | ||
opentelemetry: | ||
patterns: | ||
- "@opentelemetry/*" | ||
patch: | ||
update-types: | ||
- patch | ||
# dev-deps | ||
- package-ecosystem: npm | ||
schedule: | ||
interval: weekly | ||
allow: | ||
- dependency-type: development | ||
ignore: | ||
- dependency-name: "@map-colonies/schemas" | ||
directory: / | ||
commit-message: | ||
prefix: "build(dev-deps)" | ||
groups: | ||
map-colonies: | ||
patterns: | ||
- "@map-colonies/*" | ||
opentelemetry: | ||
patterns: | ||
- "@opentelemetry/*" | ||
types: | ||
patterns: | ||
- "@types/*" | ||
dev-patch: | ||
update-types: | ||
- patch | ||
|
||
# github deps | ||
- package-ecosystem: github-actions | ||
schedule: | ||
interval: weekly | ||
commit-message: | ||
prefix: "ci(deps)" | ||
directory: "/" |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
name: publish | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write # allow GITHUB_TOKEN to publish packages | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Init nodejs | ||
uses: ./.github/actions/init-npm | ||
with: | ||
node-version: 20.x | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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,53 @@ | ||
name: pull_request | ||
|
||
on: [pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
eslint: | ||
name: Run TS Project eslint | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node: [20.x, 22.x] | ||
|
||
steps: | ||
- name: Check out TS Project Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Init nodejs | ||
uses: ./.github/actions/init-npm | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Run TS Project linters | ||
uses: wearerequired/lint-action@v2 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
# Enable linters | ||
eslint: true | ||
prettier: true | ||
eslint_extensions: ts | ||
|
||
tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node: [20.x, 22.x] | ||
|
||
steps: | ||
- name: Check out TS Project Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Init nodejs | ||
uses: ./.github/actions/init-npm | ||
|
||
- name: Run tests | ||
run: npm run test | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Reporters ${{ matrix.node }} | ||
path: ./reports/** |
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,24 @@ | ||
name: release-please | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
with: | ||
# this assumes that you have created a personal access token | ||
# (PAT) and configured it as a GitHub action secret named | ||
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). | ||
token: ${{ secrets.GH_PAT }} | ||
# this is a built-in strategy in release-please, see "Action Inputs" | ||
# for more options | ||
release-type: node |
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 |
---|---|---|
@@ -1 +1 @@ | ||
v12 | ||
v20 |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
rules: { | ||
"scope-enum": [2, "always", ["deps", "configurations", "logger"]], | ||
"scope-enum": [2, "always", ["deps", "dev-deps", "configurations", "logger"]], | ||
}, | ||
}; |
Oops, something went wrong.