Added Support for version bump

This commit is contained in:
Ritesh Shukla
2025-04-10 23:22:42 +05:30
parent 5f2a537d2a
commit 73a4b54f9e
4 changed files with 32 additions and 15 deletions

View File

@@ -16,13 +16,18 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
- name: 💬 Echo package.json version to Github ENV
run: echo VERSION_NUMBER=$(npm version patch --tag-version-prefix="" --no-commit-hooks) >> $GITHUB_ENV
- name: 🟢 Run npm run init
run: npm run init
- name: 💬 Echo package.json version to Github ENV
run: echo VERSION_NUMBER=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV
- name: Version Up
run: npx react-native bump-version --type patch
- name: 🤫 Output App Store Connect API Key JSON to Fastlane
run: echo -e '${{ secrets.APPSTORE_CONNECT_API_KEY_JSON }}' > appstore_connect_api_key.json
working-directory: ./ios/fastlane
@@ -39,11 +44,14 @@ jobs:
run: npm run fastlane:android:build
# Commit Fastlane Xcode build number increment
- name: 🔢 Commit Xcode build number increment
- name: 🔢 Commit changes for version increment
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[skip actions]"
file_pattern: "ios/Jellify.xcodeproj/project.pbxproj"
file_pattern: |
ios/Jellify.xcodeproj/project.pbxproj
package.json
android/app/build.gradle
- name: 🔢 Set artifact version numbers
run: |

View File

@@ -38,15 +38,15 @@ platform :ios do
app_identifier: "com.cosmonautical.jellify",
readonly: true
)
# we dont need to increment version number here anymore, because we will increment it in the github action
# increment_version_number(
# version_number: ENV['VERSION_NUMBER'],
# xcodeproj: "Jellify.xcodeproj"
# )
increment_version_number(
version_number: ENV['VERSION_NUMBER'],
xcodeproj: "Jellify.xcodeproj"
)
increment_build_number(
xcodeproj: "Jellify.xcodeproj"
)
# increment_build_number(
# xcodeproj: "Jellify.xcodeproj"
# )
build_app(
scheme: "Jellify - Release",
workspace: "Jellify.xcworkspace",

8
package-lock.json generated
View File

@@ -77,6 +77,7 @@
"jest": "^29.6.3",
"jscodeshift": "^0.15.2",
"prettier": "^2.8.8",
"react-native-cli-bump-version": "^1.5.1",
"react-test-renderer": "18.3.1",
"typescript": "5.7.3"
},
@@ -17070,6 +17071,13 @@
}
}
},
"node_modules/react-native-cli-bump-version": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/react-native-cli-bump-version/-/react-native-cli-bump-version-1.5.1.tgz",
"integrity": "sha512-C7Vss+BBD4iNMnn2YR00cU+GDDPZ+LDmIqWoh3FPwI/LBsJ/Vp5qanwtyVYRPcIe7Cg1PPB8WdeZ8XcnqF5Klw==",
"dev": true,
"license": "MIT"
},
"node_modules/react-native-device-info": {
"version": "14.0.4",
"resolved": "https://registry.npmjs.org/react-native-device-info/-/react-native-device-info-14.0.4.tgz",

View File

@@ -88,10 +88,11 @@
"jest": "^29.6.3",
"jscodeshift": "^0.15.2",
"prettier": "^2.8.8",
"react-native-cli-bump-version": "^1.5.1",
"react-test-renderer": "18.3.1",
"typescript": "5.7.3"
},
"engines": {
"node": ">=18"
}
}
}