-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated README and created publish github action
- Loading branch information
Showing
3 changed files
with
171 additions
and
5 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,74 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | ||
|
||
name: 📦 Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: main | ||
pull_request: {} | ||
|
||
jobs: | ||
lint: | ||
name: ⬣ ESLint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 🔬 Lint | ||
run: npm run lint | ||
|
||
typecheck: | ||
name: ʦ TypeScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
|
||
- name: 🔎 Type check | ||
run: npm run typecheck --if-present | ||
|
||
publish: | ||
name: 📦 Publish | ||
runs-on: ubuntu-latest | ||
needs: [lint, typecheck] | ||
if: ${{github.event_name == 'release'}} | ||
steps: | ||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: ⚙️ Install dependencies | ||
run: npm ci | ||
|
||
- name: 👷 Build | ||
run: npm run build | ||
|
||
- name: 📦 Publish to NPM | ||
run: npm publish | ||
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
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 |
---|---|---|
@@ -1,22 +1,35 @@ | ||
{ | ||
"name": "i18next-prisma-backend", | ||
"version": "0.0.1", | ||
"description": "", | ||
"description": "Use i18next with Prisma ORM as backend", | ||
"homepage": "https://github.com/aydrian/i18next-prisma-backend", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/aydrian/i18next-prisma-backend" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/aydrian/i18next-prisma-backend/issues" | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"scripts": { | ||
"ts-types": "tsc", | ||
"typecheck": "tsc", | ||
"dev": "rimraf dist && tsup --watch", | ||
"build": "rimraf dist && env NODE_ENV=production tsup", | ||
"lint:fix": "eslint ./src --ext .ts,.tsx --quiet --fix --ignore-path ./.gitignore", | ||
"lint:format": "prettier --loglevel warn --write \"./**/*.{ts,tsx,css,md,json}\" ", | ||
"lint": "npm run lint:format && npm run lint:fix", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "Aydrian Howard", | ||
"keywords": [ | ||
"i18next", | ||
"prisma", | ||
"i18next-backend", | ||
"i18next-prisma-backend" | ||
], | ||
"author": "Aydrian Howard <[email protected]> (https://itsaydrian.com)", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^20.4.5", | ||
|
@@ -41,4 +54,4 @@ | |
"dependencies": { | ||
"i18next": "^23.2.11" | ||
} | ||
} | ||
} |