From 8e69546484c55ffa41ec1a2d41c7d3d0165eff89 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 12 Dec 2023 12:36:50 -0800 Subject: [PATCH 1/2] CI: more automation (#16) - consolidate *nix & win tests - add automated package publishing - disable coveralls, does not work in plugins - add publish.runs-on property --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 ++ .npmignore | 4 ++-- README.md | 1 + package.json | 12 ++++++------ redress.sh | 9 +++++++-- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7386c..5d1cca8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [ push ] +on: [ push, pull_request ] env: CI: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e81c15f..c33f899 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,8 @@ name: publish on: + release: + types: [ published ] push: branches: - master diff --git a/.npmignore b/.npmignore index 3e8e260..c4f6db6 100644 --- a/.npmignore +++ b/.npmignore @@ -40,13 +40,13 @@ package-lock.json bower_components # Optional npm cache directory .npmrc + .idea -.DS_Store haraka-update.sh - .github .release .codeclimate.yml +.DS_Store .editorconfig .gitignore .gitmodules diff --git a/README.md b/README.md index 036ed60..2e58ed7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![CI Test Status][ci-img]][ci-url] [![Code Climate][clim-img]][clim-url] + [![NPM][npm-img]][npm-url] # haraka-plugin-template diff --git a/package.json b/package.json index ee96bb1..64dec7d 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "haraka-plugin-template", - "version": "1.0.3", - "description": "Haraka plugin that frobnicates email connections", + "version": "1.0.4", + "description": "Haraka plugin that...CHANGE THIS", "main": "index.js", "scripts": { - "lint": "npx eslint *.js test/*.js", - "lintfix": "npx eslint --fix *.js test/*.js", + "lint": "npx eslint *.js test", + "lintfix": "npx eslint --fix *.js test", "versions": "npx dependency-version-checker check", "test": "npx mocha" }, @@ -25,9 +25,9 @@ }, "homepage": "https://github.com/haraka/haraka-plugin-template#readme", "devDependencies": { - "eslint": "8", + "eslint": "8.55.0", "eslint-plugin-haraka": "*", "haraka-test-fixtures": "*", - "mocha": "9" + "mocha": "10.2.0" } } diff --git a/redress.sh b/redress.sh index ebcf134..88660e5 100755 --- a/redress.sh +++ b/redress.sh @@ -5,14 +5,19 @@ if [ -z "$1" ]; then exit fi -sed -i '' -e "s/template/${1}/g" README.md +sed -i '' \ + -e "s/template/${1}/g" \ + README.md sed -i '' \ -e "s/template/${1}/g" \ -e "s/template\.ini/$1.ini/" \ test/index.js -sed -i '' -e "s/template/${1}/g" package.json +sed -i '' \ + -e "s/template/${1}/g" \ + package.json + sed -i '' \ -e "s/_template/_${1}/g" \ -e "s/template\.ini/$1.ini/" \ From f757c542b41dece238e66f5a9e749e47217d7663 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Tue, 12 Dec 2023 12:58:53 -0800 Subject: [PATCH 2/2] revert --- .npmignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index c4f6db6..a1802f9 100644 --- a/.npmignore +++ b/.npmignore @@ -42,11 +42,12 @@ bower_components .npmrc .idea +.DS_Store haraka-update.sh + .github .release .codeclimate.yml -.DS_Store .editorconfig .gitignore .gitmodules