-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Automate updating rgbds to new version? #65
Comments
This comment has been minimized.
This comment has been minimized.
2nd example: this PR is created by this action Ready to use action name: Autoupdate
on:
workflow_dispatch:
inputs:
version:
required: true
jobs:
build:
name: Autoupdate RGBDS
runs-on: ubuntu-latest
env:
VERSION : ${{ github.event.inputs.version }}
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: '0'
- name: Create branch
run: |
git checkout -b feature/autoupdate_${{env.VERSION}}
- name: Checkout new RGBDS version (and recreate patch)
run: |
cd rgbds
git checkout ${{env.VERSION}}
patch -p1 --no-backup-if-mismatch < ../patches/rgbds.patch
git diff --patch > ../patches/rgbds.patch
git clean -fd && git reset --hard
cd ..
- name: Commit autoupdate
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git commit -am "Autoupdate RGBDS ${{env.VERSION}}"
git push origin feature/autoupdate_${{env.VERSION}}
- name: Create pull request
run: |
gh pr create -H feature/autoupdate_${{env.VERSION}} -B master --title 'Autoupdate RGBDS ${{env.VERSION}}' --body 'Autoupdate RGBDS ${{env.VERSION}}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
^^^^^ (for the future readers: this pull request prolly not exists as I like to"re-fork" clean repo when I'm adding something - it was only here for showcase a running solution) |
This is a cool idea, although are we sure that the patch will remain working when upstream source code changes? |
This is only PR ... so if there is breaking change which mess up with patching it should just fail test build Edit: If so, someone need to do this manually |
The idea is simple. Here is working solution:
This acts as rgbds and this acts as rgbds-live
Every time you publish new Release in "rgbds"(projectx) it will automatically run autoupdate action in "rgbds-live"(projectx_using) with
version
parameterThis action would:
version
branchversion
tagThe text was updated successfully, but these errors were encountered: