Skip to content

Commit 541796b

Browse files
committed
ci: ensure npm version >= 11.5.1
1 parent 3dc7df4 commit 541796b

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version or semver (e.g., 3.2.0 | patch | minor | major)'
7+
description: 'Choose version bump type'
88
required: true
9-
type: string
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
default: patch
1015
tag:
1116
description: 'npm dist-tag to publish under'
1217
required: true
@@ -18,18 +23,8 @@ on:
1823
create_release:
1924
description: 'Also create a GitHub Release from the tag'
2025
required: false
21-
default: false
26+
default: true
2227
type: boolean
23-
git_user_name:
24-
description: 'Git author name for release commit'
25-
required: false
26-
default: 'react-native-iap bot'
27-
type: string
28-
git_user_email:
29-
description: 'Git author email for release commit'
30-
required: false
31-
default: 'github-actions[bot]@users.noreply.github.com'
32-
type: string
3328

3429
permissions:
3530
contents: write
@@ -76,8 +71,8 @@ jobs:
7671
7772
- name: Configure Git user
7873
run: |
79-
git config user.name "${{ github.event.inputs.git_user_name }}"
80-
git config user.email "${{ github.event.inputs.git_user_email }}"
74+
git config user.name "react-native-iap bot"
75+
git config user.email "github-actions[bot]@users.noreply.github.com"
8176
8277
- name: Bump version and tag
8378
id: bump
@@ -96,12 +91,15 @@ jobs:
9691
run: |
9792
git push --follow-tags
9893
99-
- name: Publish to npm with provenance
94+
- name: Ensure npm CLI v11.5.1 or later (required for OIDC)
95+
run: npm install -g npm@latest
96+
97+
- name: Publish to npm with OIDC trusted publishing
10098
run: |
10199
if [ "${{ github.event.inputs.tag }}" = "latest" ]; then
102-
npm publish --provenance --access public
100+
npm publish --access public --provenance
103101
else
104-
npm publish --tag ${{ github.event.inputs.tag }} --provenance --access public
102+
npm publish --tag ${{ github.event.inputs.tag }} --access public --provenance
105103
fi
106104
107105
- name: Create GitHub Release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-iap",
3-
"version": "14.4.36",
3+
"version": "14.4.35",
44
"description": "React Native In-App Purchases module for iOS and Android using Nitro",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",

0 commit comments

Comments
 (0)