Skip to content

chore: release react-native 0.11.14 #190

chore: release react-native 0.11.14

chore: release react-native 0.11.14 #190

name: React Native auto release upon a new capture-sdk release
on:
pull_request:
types: [closed]
branches: [main]
jobs:
auto-publish:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'Update Capture SDK version to') && github.event.pull_request.user.login == 'github-actions[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
actions: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/javascript-setup
- name: Read expected React Native version from file
id: extract-version
run: |
if [ -f ".auto-release-react-version" ]; then
RN_VERSION=$(cat .auto-release-react-version | tr -d '\n\r')
echo "Read expected React Native version from file: $RN_VERSION"
else
echo "ERROR: .auto-release-react-version file not found!"
echo "This should have been created by the update workflow"
exit 1
fi
echo "rn_version=$RN_VERSION" >> $GITHUB_OUTPUT
echo "Using React Native version: $RN_VERSION"
- name: Trigger React Native release workflow
uses: actions/github-script@v7
with:
script: |
const version = '${{ steps.extract-version.outputs.rn_version }}';
console.log(`Auto-publishing React Native package version: ${version}`);
// Trigger the React Native release workflow directly by workflow ID
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 139447071,
ref: 'main',
inputs: {
version: version
}
});
console.log(`Successfully triggered React Native Release workflow for version ${version}`);
console.log('Package will be published to npm automatically');
- name: Create release summary
run: |
echo "## Auto-Publish Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **PR Title:** ${{ github.event.pull_request.title }}" >> $GITHUB_STEP_SUMMARY
echo "- **React Native Version:** ${{ steps.extract-version.outputs.rn_version }}" >> $GITHUB_STEP_SUMMARY
echo "- **Status:** Auto-publish workflow triggered" >> $GITHUB_STEP_SUMMARY
echo "- **Next Step:** React Native Release workflow will publish to npm" >> $GITHUB_STEP_SUMMARY