quakespasm/.github/workflows/build-and-release.yml
2022-07-15 18:50:16 -04:00

116 lines
4 KiB
YAML

name: Build and Publish Release
on: [push]
jobs:
Compile-VPK:
runs-on: ubuntu-latest
outputs:
vpk_link: ${{ steps.zip.outputs.zip }}
container:
image: vitasdk/vitasdk:latest
steps:
- uses: actions/checkout@v2
- name: Install Packages and update VitaGL
run: |
apk add bash build-base zip git curl cmake
vdpm vitagl
git clone https://github.com/bythos14/SceShaccCgExt.git
cd SceShaccCgExt
mkdir build && cd build
cmake .. && make -j$(numproc) install
- name: Build
working-directory: ./
run: |
make -f Makefile.vita
- name: Zip and Upload
id: zip
working-directory: ./build/vita
run: |
zip -r vita-nzp-vpk.zip nzp.vpk
curl --upload-file ./vita-nzp-vpk.zip https://transfer.sh/vita-nzp-vpk.zip > output-log.log
echo "::set-output name=zip::$(cat output-log.log)"
Compile-NRO:
runs-on: ubuntu-latest
needs: Compile-VPK
outputs:
vpk_link: ${{ steps.vpk.outputs.vpk }}
nx_link: ${{ steps.zip.outputs.zip }}
container:
image: devkitpro/devkita64
steps:
- uses: actions/checkout@v2
- name: Store VPK link
id: vpk
run: |
echo "::set-output name=vpk::${{ needs.Compile-VPK.outputs.vpk_link }}"
- name: Build
working-directory: ./
run: |
make -f Makefile.nx
- name: Zip and Upload
id: zip
working-directory: ./build/nx
run: |
zip -r nx-nzp-nro.zip nzportable.nro nzportable.nacp
curl --upload-file ./nx-nzp-nro.zip https://transfer.sh/nx-nzp-nro.zip > output-log.log
echo "::set-output name=zip::$(cat output-log.log)"
Unify-and-Release:
runs-on: ubuntu-latest
needs: Compile-NRO
steps:
- uses: actions/checkout@v2
- name: Download Archives
working-directory: ./
run: |
curl ${{ needs.Compile-NRO.outputs.vpk_link }} -o vita-nzp-vpk.zip
curl ${{ needs.Compile-NRO.outputs.nx_link }} -o nx-nzp-nro.zip
- 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.0
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 PSP NX/VITA release, stability is not guarenteed.
To install:
- Grab the .ZIP archive for your platform
- VITA: Extract the `.VPK`, copy it to your VITA, and install with VitaShell.
- NX: Extract `nzportable.nro` to `switch/nzportable` on your Nintendo Switch.
draft: true
prerelease: false
- name: Upload VITA Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./vita-nzp-vpk.zip
asset_name: vita-nzp-vpk.zip
asset_content_type: application/zip
- name: Upload NX Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nx-nzp-nro.zip
asset_name: nx-nzp-nro.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 }}