1010 - name : Check out repo
1111 uses : actions/checkout@v4
1212 - name : Update links
13+ id : update-links
1314 env :
1415 COMMIT_AUTHOR : ${{ secrets.CI_USERNAME }}
1516 COMMIT_EMAIL : ${{ secrets.CI_EMAIL }}
@@ -36,12 +37,32 @@ jobs:
3637 rm output.txt
3738
3839 if [[ -n $(git status -s) ]]; then
39- echo "Commit and push "
40+ echo "Links need updating, will create PR "
4041 git config --global user.name $COMMIT_AUTHOR
4142 git config --global user.email $COMMIT_EMAIL
4243 git add docs/Installation.md
4344 git commit -m "generate links"
44- git push -f -u origin master
45+ echo "changes_made=true" >> $GITHUB_OUTPUT
4546 else
4647 echo "Links are already up to date"
47- fi
48+ echo "changes_made=false" >> $GITHUB_OUTPUT
49+ fi
50+ - name : Create Pull Request
51+ if : steps.update-links.outputs.changes_made == 'true'
52+ uses : peter-evans/create-pull-request@v5
53+ with :
54+ token : ${{ secrets.GITHUB_TOKEN }}
55+ commit-message : " generate links"
56+ title : " Update SDK links for version ${{ inputs.plugin_version || 'latest' }}"
57+ body : |
58+ This PR automatically updates the SDK links in the Installation.md file.
59+
60+ **Changes:**
61+ - Updated Android SDK links
62+ - Updated iOS SDK links
63+ - Updated Unity wrapper links
64+
65+ This PR was created automatically by the release workflow.
66+ branch : update-links-${{ github.run_number }}
67+ base : master
68+ delete-branch : true
0 commit comments