routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "!dependabot/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- "!dependabot/**"
|
||||
schedule:
|
||||
- cron: "0 0 * * 0"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: "javascript"
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:javascript"
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
name: npm-bump
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
newversion:
|
||||
description: 'npm version {major,minor,patch}'
|
||||
required: true
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
|
||||
concurrency: # prevent concurrent releases
|
||||
group: npm-bump
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
version_and_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# fetch full history so things like auto-changelog work properly
|
||||
fetch-depth: 0
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: package.json
|
||||
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: npm i
|
||||
- run: npm test
|
||||
- run: git status # getting odd dirty repo errors during version debug info
|
||||
- run: git diff
|
||||
- name: npm version && npm publish
|
||||
uses: bcomnes/npm-bump@v2.2.1
|
||||
with:
|
||||
git_email: bcomnes@gmail.com
|
||||
git_username: ${{ github.actor }}
|
||||
newversion: ${{ github.event.inputs.newversion }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
|
||||
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
name: tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: package.json
|
||||
- run: npm i
|
||||
- run: npm run check
|
||||
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node: ['20', 'lts/*', '23']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm i
|
||||
- run: npm run test-mocha
|
||||
- uses: codecov/codecov-action@v5
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
with:
|
||||
flags: ${{ matrix.os }}-${{ matrix.node }}
|
||||
|
||||
automerge:
|
||||
needs: [lint, test]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
steps:
|
||||
- uses: fastify/github-action-merge-dependabot@v3
|
||||
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' && contains(github.head_ref, 'dependabot/github_actions') }}
|
||||
with:
|
||||
github-token: ${{ secrets.github_token }}
|
||||
Reference in New Issue
Block a user