Merge pull request #107 from JCog/misc #93
This file contains hidden or 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: Build fp patches | |
| on: | |
| push: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install prerequisite packages | |
| run: | | |
| sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/PracticeROM/packages/HEAD/scripts/install-debian_amd64.sh)" | |
| sudo apt-get install -y practicerom-dev xdelta3 ninja-build | |
| pip install --break-system-packages -r requirements.txt | |
| - name: Download ROMs | |
| run: | | |
| mkdir rom | |
| curl -sL -o base-jp.z64 ${{ secrets.JP_ROM }} | |
| curl -sL -o base-us.z64 ${{ secrets.US_ROM }} | |
| - name: Make fp ROMs | |
| run: | | |
| ./makerom base-jp.z64 | |
| ./makerom base-us.z64 | |
| - name: Create xdelta patches | |
| run: | | |
| xdelta3 -e -S none -s base-jp.z64 fp-jp.z64 fp-jp.xdelta | |
| xdelta3 -e -S none -s base-us.z64 fp-us.z64 fp-us.xdelta | |
| - name: Upload JP patch | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fp-jp.xdelta | |
| path: fp-jp.xdelta | |
| - name: Upload US patch | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fp-us.xdelta | |
| path: fp-us.xdelta | |
| - name: Set up S3cmd | |
| if: github.event_name == 'release' | |
| uses: s3-actions/s3cmd@v1.5.0 | |
| with: | |
| provider: aws | |
| region: 'ca-central-1' | |
| access_key: ${{ secrets.S3_ACCESS_KEY }} | |
| secret_key: ${{ secrets.S3_SECRET_KEY }} | |
| - name: Upload patches to bucket | |
| if: github.event_name == 'release' | |
| run: | | |
| s3cmd put fp-us.xdelta s3://fp-web-patcher-files/fp/${{ github.ref_name }}/us.xdelta | |
| s3cmd put fp-jp.xdelta s3://fp-web-patcher-files/fp/${{ github.ref_name }}/jp.xdelta |