Build [All] #236
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: Compile & Package | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| SHORT_SHA: ${{ github.sha }} | |
| RELEASE_FOLDER: PS2-Exploits-Installer-${{ github.sha }} | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up PS2 Toolchain | |
| uses: ps2dev/ps2toolchain-action@v1 | |
| - name: Compile Installer | |
| run: | | |
| make clean | |
| make | |
| - name: Prepare RELEASE folder with correct INSTALL structure | |
| run: | | |
| mkdir -p release/${{ env.RELEASE_FOLDER }}/INSTALL | |
| cp -r installer installer_res backups mbr .github release/${{ env.RELEASE_FOLDER }} | |
| cp README.md Changelog.md upload-tuna-branch.bat *.md .gitignore .gitattributes .clang-format Makefile release/${{ env.RELEASE_FOLDER }} || true | |
| cp FMCBInstaller.elf release/${{ env.RELEASE_FOLDER }} | |
| # Move installer_res/1966/INSTALL contents to INSTALL/ | |
| cp -r installer_res/1966/INSTALL/* release/${{ env.RELEASE_FOLDER }}/INSTALL/ | |
| # Remove old installer_res and source folders from release | |
| rm -rf release/${{ env.RELEASE_FOLDER }}/installer_res | |
| - name: Create .zip | |
| run: | | |
| cd release | |
| zip -r ../PS2-Exploits-Installer.zip ${{ env.RELEASE_FOLDER }} | |
| - name: Create .tar.gz | |
| run: | | |
| cd release | |
| tar -czvf ../PS2-Exploits-Installer.tar.gz ${{ env.RELEASE_FOLDER }} | |
| - name: Create .7z | |
| run: | | |
| sudo apt-get install p7zip-full -y | |
| cd release | |
| 7z a ../PS2-Exploits-Installer.7z ${{ env.RELEASE_FOLDER }} | |
| - name: Upload Pre-release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: "Tuna" | |
| name: "PS2 Exploits Installer" | |
| prerelease: true | |
| files: | | |
| PS2-Exploits-Installer.zip | |
| PS2-Exploits-Installer.tar.gz | |
| PS2-Exploits-Installer.7z |