YML: Download Artifacts in single-step #175
This file contains 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 and Publish Release | |
on: [push] | |
jobs: | |
Compile-VPK: | |
runs-on: ubuntu-latest | |
container: | |
image: vitasdk/vitasdk:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Packages and update VitaSDK | |
run: | | |
apk add bash build-base zip git curl cmake | |
vdpm vitashark | |
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 -j$(numproc) -f Makefile.vita | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: vita-nzp-vpk | |
path: ./build/vita/nzp.vpk | |
Compile-NRO: | |
runs-on: ubuntu-latest | |
container: | |
image: devkitpro/devkita64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
working-directory: ./ | |
run: | | |
make -j$(numproc) -f Makefile.nx | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nx-nzp-nro | |
path: | | |
./build/nx/nzportable.nro | |
./build/nx/nzportable.nacp | |
Unify-and-Release: | |
runs-on: ubuntu-latest | |
needs: [Compile-VPK, Compile-NRO] | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- 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/[email protected] | |
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 | |
- 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 }} |