Merge pull request #176 from suloku/master #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly build | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set environment variables | |
run: echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
sudo apt-get install make python3 gcc git bison | |
git clone -b v0.5.2 --depth=1 https://github.com/gbdev/rgbds | |
pushd rgbds | |
sudo make install | |
popd | |
- name: Build PiaCarrot/pokeorange | |
run: | | |
git clone https://github.com/PiaCarrot/pokeorange.git | |
pushd pokeorange | |
mkdir build | |
make -j4 | |
mv pokeorange.gbc build/pokeorange.gbc | |
mv pokeorange.sym build/pokeorange.sym | |
make clean | |
make -j4 pss | |
mv pokeorange.gbc build/pokeorange-pss.gbc | |
mv pokeorange.sym build/pokeorange-pss.sym | |
make clean | |
make -j4 debug | |
mv pokeorange.gbc build/orangedebug.gbc | |
mv pokeorange.sym build/orangedebug.sym | |
make clean | |
make -j4 pss debug | |
mv pokeorange.gbc build/orangedebug-pss.gbc | |
mv pokeorange.sym build/orangedebug-pss.sym | |
make clean | |
popd | |
- name: Delete old release | |
id: delete_release | |
uses: jagger27/delete-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: beta-nightly | |
- name: Advance nightly tag to master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pushd pokeorange | |
git tag beta-nightly -f | |
git push --tags -f "https://PiaCarrot:$GITHUB_TOKEN@github.com/PiaCarrot/pokeorange.git" | |
popd | |
- name: Create new release | |
id: create_release | |
uses: actions/create-release@v1.1.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: beta-nightly | |
release_name: beta nightly | |
body: | | |
This is the current Pokémon Orange *beta* release. The assets all have an 8-character "commit hash" at the end to identify the exact code they're built from. | |
The **.gbc** assets are ROMs. If you just want to play the game, download one (regular or `-pss`) and load it in [BGB](https://bgb.bircd.org/), [mGBA](https://mgba.io/), [Gambatte](https://github.com/sinamas/gambatte), or another accurate Game Boy Color emulator. (***Do not use VBA*** or VBA-M.) | |
The **.sym** assets are "symbol files". They're useful for debugging, or for [discovering cheat codes](https://github.com/pret/pokecrystal/wiki/Discovering-GameShark-cheat-codes), although cheats are *not* officially supported and may cause bugs or crashes. (Do ***not*** ask the developers for cheat codes.) | |
The **orangedebug** assets are ROMs and symbol files with extra features to help debug the game. Do ***not*** download these to just play with; use them to help the developers diagnose and fix bugs, or create new features. | |
draft: false | |
prerelease: true | |
- name: Upload ROM | |
id: upload | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/pokeorange.gbc | |
asset_name: pokeorange-${{ env.SHORT_SHA }}.gbc | |
asset_content_type: application/octet-stream | |
- name: Upload SYM | |
id: upload-sym | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/pokeorange.sym | |
asset_name: pokeorange-${{ env.SHORT_SHA }}.sym | |
asset_content_type: text/plain | |
- name: Upload pss ROM | |
id: upload-pss | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/pokeorange-pss.gbc | |
asset_name: pokeorange-pss-${{ env.SHORT_SHA }}.gbc | |
asset_content_type: application/octet-stream | |
- name: Upload pss SYM | |
id: upload-pss-sym | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/pokeorange-pss.sym | |
asset_name: pokeorange-pss-${{ env.SHORT_SHA }}.sym | |
asset_content_type: text/plain | |
- name: Upload debug ROM | |
id: upload-debug | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/orangedebug.gbc | |
asset_name: orangedebug-${{ env.SHORT_SHA }}.gbc | |
asset_content_type: application/octet-stream | |
- name: Upload debug SYM | |
id: upload-debug-sym | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/orangedebug.sym | |
asset_name: orangedebug-${{ env.SHORT_SHA }}.sym | |
asset_content_type: text/plain | |
- name: Upload pss debug ROM | |
id: upload-pss-debug | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/orangedebug-pss.gbc | |
asset_name: orangedebug-pss-${{ env.SHORT_SHA }}.gbc | |
asset_content_type: application/octet-stream | |
- name: Upload pss debug SYM | |
id: upload-pss-debug-sym | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./pokeorange/build/orangedebug-pss.sym | |
asset_name: orangedebug-pss-${{ env.SHORT_SHA }}.sym | |
asset_content_type: text/plain |