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

117 lines
4 KiB
YAML
Raw Normal View History

2022-02-08 19:06:54 +00:00
name: Build and Publish Release
on: [push]
jobs:
Compile-VPK:
runs-on: ubuntu-latest
outputs:
vpk_link: ${{ steps.zip.outputs.zip }}
container:
2022-02-09 16:15:46 +00:00
image: vitasdk/vitasdk:latest
2022-02-08 19:06:54 +00:00
steps:
- uses: actions/checkout@v2
2022-12-22 22:25:07 +00:00
- name: Install Packages and update VitaGL
2022-02-08 19:06:54 +00:00
run: |
2022-07-15 22:50:16 +00:00
apk add bash build-base zip git curl cmake
2022-12-22 22:25:07 +00:00
vdpm vitagl
2022-07-15 22:48:11 +00:00
git clone https://github.com/bythos14/SceShaccCgExt.git
cd SceShaccCgExt
mkdir build && cd build
cmake .. && make -j$(numproc) install
2022-02-08 19:06:54 +00:00
- name: Build
working-directory: ./
run: |
2022-11-28 14:12:31 +00:00
make -j$(numproc) -f Makefile.vita
2022-02-08 19:06:54 +00:00
- 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: |
2022-11-28 14:12:31 +00:00
make -j$(numproc) -f Makefile.nx
2022-02-08 19:06:54 +00:00
- 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:
2022-07-15 22:48:11 +00:00
id: ${{ steps.create_release.outputs.id }}