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
72 changes: 0 additions & 72 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

34 changes: 6 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,11 @@ on:
description: "version | patch | minor | major"
required: true
default: "patch"

jobs:
publish:
environment: release
runs-on: ubuntu-latest
name: 'Bump version and publish'
env:
VERSION: ${{ github.event.inputs.version }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install packages
run: npm install
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: version and publish
run: |
git stash
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
git remote add gh-origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm version $VERSION -m "Version %s"
npm publish
git push gh-origin $GITHUB_REF --tags
uses: activeprospect/github-action-workflows/.github/workflows/release.yml@master
with:
version: ${{ github.event.inputs.version }}
secrets:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js CI

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 24.x]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run tests
run: npx nyc@17.1.0 --reporter=lcov npm test
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
package-lock=false

//registry.npmjs.org/:_authToken=${NPM_TOKEN}
Loading
Loading