diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 0c87a41..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: dan-lampman - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 7e9ec76..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: dan-lampman - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..0bd2ea1 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..25bd1c2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1f5514c..e1cf723 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules coverage -.nyc_output \ No newline at end of file +.nyc_output + +# IDEA +.idea diff --git a/package.json b/package.json index ff5af82..68f9544 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,18 @@ { - "author:": "Dan L ", + "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", @@ -40,6 +45,6 @@ }, "repository": { "type": "git", - "url": "https://github.com/dan-lampman/impulse-api.git" + "url": "https://github.com/AdaSupport/impulse-api.git" } }