dquakeplus/.github/workflows/build-and-release.yml

118 lines
3.7 KiB
YAML
Raw Normal View History

2024-09-09 01:10:06 +00:00
name: Build EBOOT and Publish Release
on: [push]
jobs:
Compile-EBOOT:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
container:
image: pspdev/pspdev
steps:
- uses: actions/checkout@v2
- name: Get container ready
run: |
apk add bash zip git gmp mpc1 mpfr4 make
- name: Build
working-directory: ./
run: |
cd source/psp/libpspmath
make && make install
cd ../../../
make -f Makefile.psp install
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: psp-nzp-eboot
path: ./build/psp/bin/EBOOT.PBP
Compile-3DSX:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
o3ds_link: ${{ steps.zip.outputs.zip }}
container:
image: devkitpro/devkitarm
steps:
- uses: actions/checkout@v2
- name: Install Packages and update picaGL
run: |
git clone https://github.com/masterfeizz/picaGL.git
cd picaGL
git checkout revamp
mkdir clean
make install
- name: Build
working-directory: ./
run: |
make -f Makefile.ctr
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ctr-nzp-3dsx
path: ./build/3ds/bin/nzportable.3dsx
Unify-and-Release:
runs-on: ubuntu-latest
needs: [Compile-EBOOT, Compile-3DSX]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Wait for GitHub to keep up..
run: sleep 2s
shell: bash
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./
- name: Turn Artifacts into .ZIP archives
run: |
zip -r -j psp-nzp-eboot.zip psp-nzp-eboot/*
zip -r -j ctr-nzp-3dsx.zip ctr-nzp-3dsx/*
- name: Generate Build Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
- name: Delete Old Release
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: bleeding-edge
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: bleeding-edge
release_name: Automated Release ${{ steps.date.outputs.date }}
body: |
This is a **bleeding edge** NZ:P NX/VITA release, stability is not guarenteed.
To install:
- Grab the .ZIP archive for your platform
- PSP: Extract the `EBOOT.PBP` to `/PSP/GAME/nzportable/`
- 3DS: Extract `nzportable.3dsx` to `/3ds/nzportable/`.
draft: true
prerelease: false
- name: Upload PSP Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./psp-nzp-eboot.zip
asset_name: psp-nzp-eboot.zip
asset_content_type: application/zip
- name: Upload 3DS Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ctr-nzp-3dsx.zip
asset_name: ctr-nzp-3dsx.zip
asset_content_type: application/zip
- name: Publish Release
uses: StuYarrow/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}