Skip to content

build(deps-dev): bump mocha from 10.7.3 to 11.0.1 #24

build(deps-dev): bump mocha from 10.7.3 to 11.0.1

build(deps-dev): bump mocha from 10.7.3 to 11.0.1 #24

Workflow file for this run

name: "Build (w/ tests)"
on:
push:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.x', '20.x']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm run test
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
permissions:
id-token: write #npm provenance
environment:
name: npm
url: https://www.npmjs.org/package/fast-ssdeep
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Publish to npmjs
run: pnpm publish --provenance --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}