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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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
registry-url: 'https://registry.npmjs.org'

- 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 lint

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

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

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

- name: Use dependencies cache
uses: actions/cache@v3
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
28 changes: 0 additions & 28 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
3 changes: 0 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
"homepage": "https://github.com/voorhoede/datocms-plugin-translate-fields",
"version": "1.15.0",
"description": "A DatoCMS plugin that gives you the ability to translate `structured-text`, `rich-text`, `string`, `text`, `seo` and `slug` fields in DatoCMS",
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"dev": "cross-env REACT_APP_USE_MOCK=true npm run start",
"start": "cross-env BROWSER='none' PUBLIC_URL='/' react-scripts start",
"build": "cross-env PUBLIC_URL='.' react-scripts build",
"test": "jest",
"test:watch": "jest --watch",
"eject": "react-scripts eject",
"lint": "prettier --check .",
"prettier": "prettier --write .",
"pre-commit": "npm run prettier",
"prepack": "npm run build",
Expand Down Expand Up @@ -74,7 +72,7 @@
],
"repository": {
"type": "git",
"url": "https://github.com/voorhoede/datocms-plugin-translate-fields.git"
"url": "git+https://github.com/voorhoede/datocms-plugin-translate-fields.git"
},
"author": "Voorhoede",
"license": "ISC",
Expand Down