Skip to content

Commit

Permalink
Added support for github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ragarwalll committed Sep 24, 2023
1 parent dcf72b8 commit 295a92b
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 27 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,18 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2.0.1
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
run: npm install

- name: Check linting
run: pnpm lint
run: npm run lint

- name: Check formatting
run: pnpm format
run: npm run format

- name: Build
run: pnpm build
run: npm run build
30 changes: 19 additions & 11 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@ jobs:
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2.0.1
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies and build
run: pnpm i && pnpm build
- name: Install dependencies
run: npm install

- name: Check linting
run: npm run lint

- name: Publish package
run: pnpm publish
- name: Check formatting
run: npm run format

- name: Build
run: npm run build

- name: Publish package to GitHub
run: npm publish --userconfig registry/.npmrc.github
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Publish package to npmjs
run: npm publish --userconfig registry/.npmrc.npmjs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
git-checks=false
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ client.then(() => {
const { insert, remove, find, update, prepareForTable } =
databaseOperations();

find<Users, false>({
find<Users>({
columnNames: ["name"],
conditions: {
name: "",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ragarwal06/hana-orm",
"version": "0.0.3-beta",
"version": "0.0.4-beta",
"description": "HANA ORM library for node js applications",
"license": "ISC",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions registry/.npmrc.github
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git-checks=false
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}
registry=https://npm.pkg.github.com
always-auth=true
4 changes: 4 additions & 0 deletions registry/.npmrc.npmjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git-checks=false
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
registry=https://registry.npmjs.org/
always-auth=true

0 comments on commit 295a92b

Please sign in to comment.