From b0947f1a38e1141eb504c81a82dd48f3c0311bfb Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Sat, 13 Dec 2025 07:34:24 +0100 Subject: [PATCH 1/4] feat: update npm publishing --- .github/actions/setup/action.yml | 3 ++- .github/workflows/publish-release.yml | 36 ++++++++++----------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 209877d..9367239 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -7,8 +7,9 @@ runs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: '20' node-version-file: .nvmrc + npm-version: '12.10.0' - name: Install dependencies run: | diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index fa9353d..098626d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -3,25 +3,26 @@ on: pull_request: types: [closed] branches: - - 'main' + - "main" push: tags: - - 'v*' + - "v*" + +permissions: + contents: read + id-token: write jobs: release_gh: - name: Create new GitHub release + name: Create new GitHub release if: contains(github.event.pull_request.labels.*.name, 'release') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' + - name: Setup + uses: ./.github/actions/setup - name: git config run: | @@ -48,28 +49,17 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - node-version-file: .nvmrc - - - name: Install dependencies - run: npm ci - shell: bash + - name: Setup + uses: ./.github/actions/setup - name: Compile .ts files run: npm run ts:build shell: bash - - name: Configure git run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - - name: Publish package + + - name: Publish package run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 02a7a2f3e70aae9f23e4cd895c234baa9d8fcf42 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Sat, 13 Dec 2025 07:46:33 +0100 Subject: [PATCH 2/4] chore: add homepage --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e1638c5..6768d41 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "bugs": { "url": "https://github.com/talsec/Free-RASP-Capacitor/issues" }, + "homepage": "https://docs.talsec.app/freerasp", "keywords": [ "capacitor", "plugin", From de634d60bd6c0e52fee9008d7302220539c82056 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Fri, 19 Dec 2025 18:52:46 +0100 Subject: [PATCH 3/4] chore: update action --- .github/actions/setup/action.yml | 2 +- .github/workflows/publish-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 9367239..71c9b5e 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -7,7 +7,7 @@ runs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '20.x' node-version-file: .nvmrc npm-version: '12.10.0' diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 098626d..1c80140 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -9,7 +9,7 @@ on: - "v*" permissions: - contents: read + contents: write id-token: write jobs: From 650155b4fa0b4c01a8f391a7f51eb949d09bf613 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Fri, 19 Dec 2025 18:55:24 +0100 Subject: [PATCH 4/4] fix: npm install --- .github/actions/setup/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 71c9b5e..9cb1511 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -9,7 +9,10 @@ runs: with: node-version: '20.x' node-version-file: .nvmrc - npm-version: '12.10.0' + + - name: Upgrade npm for trusted publishing + run: npm install -g npm@latest + shell: bash - name: Install dependencies run: |