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
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Continuous Integration

on:
pull_request:

permissions:
contents: read

jobs:
main:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
package-manager-cache: false

- name: Use dependencies cache
uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund

- run: npm run test
27 changes: 10 additions & 17 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,27 @@ name: Publish Package
on:
push:
tags:
- 'v**'
- 'v*'

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Use dependencies cache
uses: actions/cache@v3
uses: actions/setup-node@v6
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
node-version-file: '.node-version'
package-manager-cache: false

- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund

- name: Publish package
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: npm publish --access public
30 changes: 0 additions & 30 deletions .github/workflows/test.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v25
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
engine-strict = true
min-release-age = 2
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"homepage": "https://github.com/voorhoede/datocms-plugin-computed-fields",
"version": "2.5.1",
"description": "This plugin allows to compute and define a field value based on other fields",
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"start": "cross-env BROWSER='none' PUBLIC_URL='/' react-scripts start",
"build": "cross-env PUBLIC_URL='.' react-scripts build",
Expand Down Expand Up @@ -76,7 +73,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/voorhoede/datocms-plugin-computed-fields.git"
"url": "git+https://github.com/voorhoede/datocms-plugin-computed-fields.git"
},
"author": "Voorhoede <victor@voorhoede.nl>",
"license": "ISC",
Expand Down