Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will run each time a PR is opened or updated

name: CI Checks

on: push

env:
NODE_VERSION: 20

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
cache: "npm"
- name: "Install dependencies"
run: npm install --from-lock-file
- name: "Run tests"
run: npm test

lint:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
cache: "npm"
- name: "Install dependencies"
run: npm install --from-lock-file
- name: "Lint"
run: npm run lint
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: NPM publish

on:
push:
branches:
- main

env:
NODE_VERSION: 20

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # allow GITHUB_TOKEN to publish packages
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://npm.pkg.github.com/
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: "https://npm.pkg.github.com"
outputs:
type: ${{ steps.publish.outputs.type }}

create-release:
runs-on: ubuntu-latest
needs: publish
if: needs.publish.outputs.type
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Get package version"
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: "Create release"
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ steps.package-version.outputs.current-version }}
commit: "main"
generateReleaseNotes: true
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules
coverage
.nyc_output
.nyc_output

# IDEA
.idea
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"author:": "Dan L <dan.lampman@gmail.com>",
"author:": "Ada Engineers",
"main": "./src/api.js",
"name": "impulse-api",
"description": "A quick and efficient Api with Express under the hood.",
"author": {
"name": "Ada Support"
},
"main": "./src/api.js",
"name": "impulse-api",
"description": "Fork of a legacy dependency",
"license": "MIT",
"pre-commit": [
"lint",
"test"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"scripts": {
"lint": "eslint --ignore-path .gitignore .",
"test": "nyc --reporter=lcov --reporter=text-summary mocha",
Expand Down Expand Up @@ -40,6 +45,6 @@
},
"repository": {
"type": "git",
"url": "https://github.com/dan-lampman/impulse-api.git"
"url": "https://github.com/AdaSupport/impulse-api.git"
}
}