From 1f29683fd707243837c28a98bf6c468fcf600d91 Mon Sep 17 00:00:00 2001 From: Christian Peick Date: Mon, 7 Jul 2025 14:33:59 +0200 Subject: [PATCH] INF-141 publish to github --- .github/workflows/publish.yaml | 18 ++------- .github/workflows/test.yaml | 2 +- .gitignore | 2 +- .npmrc | 2 + package.json | 73 +++++++++++++++++----------------- 5 files changed, 45 insertions(+), 52 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 3c170f8..0653bc7 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,7 +10,7 @@ jobs: steps: # Environment setup - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v2 with: @@ -33,23 +33,13 @@ jobs: - name: Test run: pnpm test - - # Update Documentation - - name: Generate Documentation - run: pnpm doc - - - name: Publish Documentation - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: docs - branch: gh-pages # Final touches - name: Replace version in package.json to be semver compatible run: sed -i "s/IN-DEV/$(echo $GITHUB_REF | sed 's/refs\/tags\///')/" package.json # Publish to registries - - name: Publish package on NPM - run: pnpm publish . --access public --no-git-checks + - name: Publish package on GitHub + run: pnpm publish . --access=restricted --no-git-checks --report-summary env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + sToken: ${{ secrets.TECSAFE_PACKAGES_READ_WRITE }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0e1b6c1..89664e1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,7 +15,7 @@ jobs: steps: # Environment setup - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v2 with: diff --git a/.gitignore b/.gitignore index d7ccacd..90ccf31 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,4 @@ yarn-error.log* next-env.d.ts .parcel-cache/ -/docs +/docs \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..ee42ec9 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +@tecsafe:registry=https://npm.pkg.github.com +//npm.pkg.github.com/:_authToken=${sToken} \ No newline at end of file diff --git a/package.json b/package.json index e676f9c..e412ad9 100644 --- a/package.json +++ b/package.json @@ -1,40 +1,41 @@ { - "name": "@tecsafe/app-js-sdk", - "version": "IN-DEV", - "description": "Tecsafe App JS SDK for automated IFrame and JWT management", - "source": "src/index.ts", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "type": "module", - "license": "MIT", - "devDependencies": { - "@jest/globals": "^29.7.0", - "@parcel/packager-ts": "2.12.0", - "@parcel/transformer-typescript-types": "2.12.0", - "jest": "^29.7.0", - "parcel": "^2.12.0", - "prettier": "^3.3.3", - "ts-jest": "^29.2.5", - "typedoc": "^0.26.6", - "typescript": "^5.5.4" - }, - "dependencies": { - "@tecsafe/jwt-sdk": "^0.1.2" - }, - "scripts": { - "build": "parcel build", - "doc": "typedoc --out docs src/index.ts", - "test": "echo \"Error: no test specified\"", - "lint": "prettier src/* --check", - "lint:fix": "prettier src/* --write" - }, - "targets": { - "main": { - "includeNodeModules": true, - "optimize": true - } - }, + "name": "@tecsafe/app-js-sdk", + "repository": "https://github.com/TECSAFE/app-js-sdk", + "version": "IN-DEV", + "description": "Tecsafe App JS SDK for automated IFrame and JWT management", + "source": "src/index.ts", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "type": "module", + "license": "MIT", + "devDependencies": { + "@jest/globals": "^29.7.0", + "@parcel/packager-ts": "2.12.0", + "@parcel/transformer-typescript-types": "2.12.0", + "jest": "^29.7.0", + "parcel": "^2.12.0", + "prettier": "^3.3.3", + "ts-jest": "^29.2.5", + "typedoc": "^0.26.6", + "typescript": "^5.5.4" + }, + "dependencies": { + "@tecsafe/jwt-sdk": "^0.1.2" + }, + "scripts": { + "build": "parcel build", + "doc": "typedoc --out docs src/index.ts", + "test": "echo \"Error: no test specified\"", + "lint": "prettier src/* --check", + "lint:fix": "prettier src/* --write" + }, + "targets": { + "main": { + "includeNodeModules": true, + "optimize": true + } + }, "alias": { "jose": false }