-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
6,781 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
coverage/ | ||
dist/ | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"@typescript-eslint" | ||
], | ||
rules: { | ||
"@typescript-eslint/explicit-module-boundary-types": "off", | ||
"@typescript-eslint/no-explicit-any": "off" | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name-template: 'v$RESOLVED_VERSION 🌈' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
|
||
categories: | ||
- title: '🚀 Features' | ||
label: 'features' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
label: 'chore' | ||
- title: '📝 Document' | ||
label: 'documentation' | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' | ||
template: | | ||
## ✨Changes | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: build and publish | ||
|
||
# Triggers when pushed to master branch | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '!*' | ||
|
||
jobs: | ||
test: | ||
name: check and test | ||
runs-on: ubuntu-latest | ||
# services: | ||
# postgres: | ||
# image: postgres:12 | ||
# env: | ||
# POSTGRES_USER: postgres | ||
# POSTGRES_PASSWORD: postgres | ||
# POSTGRES_DB: postgres | ||
# options: >- | ||
# --health-cmd pg_isready | ||
# --health-interval 10s | ||
# --health-timeout 5s | ||
# --health-retries 5 | ||
# ports: | ||
# - 5432:5432 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: rm -rf package-lock.json | ||
- run: npm i | ||
- run: npm run lint | ||
# - run: npx -y ninsho-cli@latest create-table | ||
- run: npm test | ||
# env: | ||
# POSTGRES_HOST: localhost | ||
# POSTGRES_PORT: 5432 | ||
# POSTGRES_USER: postgres | ||
# POSTGRES_PASSWORD: postgres | ||
# POSTGRES_DB: postgres | ||
|
||
release: | ||
needs: test | ||
name: release-npm-package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: setup-node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
# Get npm version of ninsho | ||
- name: get-npm-version | ||
id: npm-version | ||
run: echo "npm_version=$(npm show ninsho-module-mailer version)" >> $GITHUB_ENV | ||
|
||
# Get version from package.json | ||
- name: get-package-version | ||
id: package-version | ||
run: echo "package_version=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | ||
|
||
# Create tag with current package version | ||
- name: current-package-version-to-git-tag | ||
uses: pkgdeps/git-tag-action@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_repo: ${{ github.repository }} | ||
git_commit_sha: ${{ github.sha }} | ||
git_tag_prefix: '' | ||
version: ${{ env.package_version }} | ||
|
||
# Create release draft | ||
- name: release-draft | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
name: ${{ env.package_version }} | ||
version: ${{ env.package_version }} | ||
tag: ${{ env.package_version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Compare versions and publish if necessary | ||
- name: compare-versions-and-publish | ||
run: | | ||
if [ "${{ env.npm_version }}" != "${{ env.package_version }}" ]; then | ||
npm ci | ||
npm run build | ||
npm publish --access public | ||
fi | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
coverage | ||
.env | ||
.DS_Store | ||
logs | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"notify": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 ninsho | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# ninsho-module-mailer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"roots": ["<rootDir>/src"], | ||
"testMatch": [ | ||
"**/src/**/__tests__/**/?(*.)+(spec).+(ts)" | ||
], | ||
"transform": { | ||
"^.+\\.(ts)$": "ts-jest" | ||
}, | ||
"coveragePathIgnorePatterns": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.