Skip to content

Commit cd82177

Browse files
authored
feat: update npm publishing (#127)
* feat: update npm publishing * chore: update homepage
1 parent 24f24a3 commit cd82177

File tree

3 files changed

+17
-41
lines changed

3 files changed

+17
-41
lines changed

.github/actions/setup/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ runs:
77
- name: Setup Node.js
88
uses: actions/setup-node@v4
99
with:
10-
node-version: 20.x
10+
node-version: '20'
1111
node-version-file: .nvmrc
12+
npm-version: '12.10.0'
1213

1314
- name: Install dependencies
1415
run: yarn install --immutable
Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
name: Publish new release
2+
23
on:
34
pull_request:
45
types: [closed]
56
branches:
6-
- 'master'
7+
- "master"
78
push:
89
tags:
9-
- 'v*'
10+
- "v*"
11+
12+
permissions:
13+
contents: read
14+
id-token: write
1015

1116
jobs:
1217
release_gh:
13-
name: Create new GitHub release
18+
name: Create new GitHub release
1419
if: contains(github.event.pull_request.labels.*.name, 'release')
1520

1621
runs-on: ubuntu-latest
1722
steps:
1823
- uses: actions/checkout@v4
1924

20-
- name: Setup Node
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: '20.x'
24-
registry-url: 'https://registry.npmjs.org'
25+
- name: Setup
26+
uses: ./.github/actions/setup
2527

2628
- name: git config
2729
run: |
@@ -48,40 +50,13 @@ jobs:
4850
steps:
4951
- uses: actions/checkout@v4
5052

51-
- name: Setup Node
52-
uses: actions/setup-node@v4
53-
with:
54-
node-version: '20.x'
55-
registry-url: 'https://registry.npmjs.org'
56-
node-version-file: .nvmrc
57-
58-
- name: Cache dependencies
59-
id: yarn-cache
60-
uses: actions/cache@v4
61-
with:
62-
path: |
63-
**/node_modules
64-
.yarn/install-state.gz
65-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
66-
restore-keys: |
67-
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
68-
${{ runner.os }}-yarn-
69-
70-
- name: Install dependencies
71-
if: steps.yarn-cache.outputs.cache-hit != 'true'
72-
run: yarn install --immutable
73-
shell: bash
74-
75-
- name: Build Expo plugin
76-
run: yarn build:plugin
77-
shell: bash
53+
- name: Setup
54+
uses: ./.github/actions/setup
7855

7956
- name: Configure git
8057
run: |
8158
git config user.name "${GITHUB_ACTOR}"
8259
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
83-
84-
- name: Publish package
60+
61+
- name: Publish package
8562
run: npm publish
86-
env:
87-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"bugs": {
4242
"url": "https://github.com/talsec/Free-RASP-ReactNative/issues"
4343
},
44-
"homepage": "https://github.com/talsec/Free-RASP-ReactNative#readme",
44+
"homepage": "https://docs.talsec.app/freerasp",
4545
"publishConfig": {
4646
"registry": "https://registry.npmjs.org/"
4747
},

0 commit comments

Comments
 (0)