Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: checkout SDK version made static again #487

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/version_update_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Version trigger workflow

on:
pull_request:

jobs:
build:
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Fetch the pull request diff
run: git fetch origin ${{ github.event.pull_request.base.sha }} ${{ github.sha }}

- name: Check if a particular file has changed
id: check_file
run: |
# Check if 'package.json' has changed in the PR
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -q 'package.json'; then
echo "file_changed=true" >> $GITHUB_ENV
else
echo "file_changed=false" >> $GITHUB_ENV
fi

- name: Take action based on file change
if: env.file_changed == 'true'
run: |
echo "version_line=$(grep -m 1 "\"version\":" ${GITHUB_WORKSPACE}/package.json)" >> $GITHUB_ENV

- name: Post a comment on the PR
if: env.file_changed == 'true'
uses: actions/github-script@v6
with:
script: |

const message = `pg-core-sdk-version-update\n$version_line\nSDK: React-Native Standard Checkout SDK";`

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: message,
})
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.razorpay:checkout:1.6.+'
implementation 'com.razorpay:checkout:1.6.41'
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-razorpay",
"version": "2.3.0",
"version": "2.3.1",
"description": "React Native wrapper for Razorpay",
"main": "RazorpayCheckout.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1