v1.2.0 #6
Workflow file for this run
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: Create release by tag | |
on: | |
release: | |
types: [published] | |
jobs: | |
build_vita_server: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install flatc | |
run: | | |
sudo apt update | |
sudo apt install -y make git-core cmake python3 | |
git clone --branch v24.3.25 https://github.com/google/flatbuffers.git | |
cd flatbuffers | |
cmake -G "Unix Makefiles" | |
make -j | |
sudo make install | |
sudo ldconfig | |
- name: Install VitaSDK | |
run: | | |
echo "VITASDK=/usr/local/vitasdk" >> $GITHUB_ENV | |
git clone https://github.com/vitasdk/vdpm | |
cd vdpm | |
export VITASDK=/usr/local/vitasdk | |
export PATH="$VITASDK/bin:$PATH" | |
./bootstrap-vitasdk.sh | |
./install-all.sh | |
./vdpm flatbuffers | |
- name: Build VitaOxiPad | |
run: | | |
cmake -S server -B build -D CMAKE_BUILD_TYPE=Debug && cmake --build build | |
cp ./build/VitaOxiPad ./build/VitaOxiPad.elf | |
- name: Upload VPK as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: VitaOxiPad.vpk | |
path: ./build/VitaOxiPad.vpk | |
- name: Upload ELF as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: VitaOxiPad.elf | |
path: ./build/VitaOxiPad.elf | |
build_windows_client: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: > | |
git | |
mingw-w64-ucrt-x86_64-gcc | |
mingw-w64-i686-gcc | |
mingw-w64-x86_64-rust | |
mingw-w64-i686-rust | |
mingw-w64-x86_64-flatbuffers | |
make | |
wget | |
cmake | |
- name: Cache Cargo registry and build | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Install dependencies | |
run: | | |
pacman -S --noconfirm mingw-w64-x86_64-rust mingw-w64-i686-rust mingw-w64-x86_64-flatbuffers mingw-w64-x86_64-cargo-c mingw-w64-i686-cargo-c make wget cmake | |
wget https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-flatbuffers-23.5.26-2-any.pkg.tar.zst | |
pacman -U --noconfirm mingw-w64-i686-flatbuffers-23.5.26-2-any.pkg.tar.zst | |
- name: Build Windows x64 Client | |
run: | | |
export PATH="${{ steps.msys2.outputs.msys2-location }}/mingw64/bin:${PATH}" | |
cd ./client | |
cargo check --all-targets | |
cargo test --all-targets | |
cargo build --release --bin cli | |
cp ./target/release/cli.exe ./target/release/VitaOxiPad-x64.exe | |
- name: Upload Windows x64 binary as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: VitaOxiPad-x64.exe | |
path: ./client/target/release/VitaOxiPad-x64.exe | |
- name: Build Windows x32 Client | |
run: | | |
export PATH="${{ steps.msys2.outputs.msys2-location }}/mingw32/bin:${PATH}" | |
cd ./client | |
cargo check --all-targets | |
cargo test --all-targets | |
CARGO_TARGET_ARCH="i686" cargo build --release --bin cli | |
cp ./target/release/cli.exe ./target/release/VitaOxiPad-x32.exe | |
- name: Upload Windows x32 binary as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: VitaOxiPad-x32.exe | |
path: ./client/target/release/VitaOxiPad-x32.exe | |
upload_release: | |
needs: [build_vita_server, build_windows_client] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download VitaOxiPad.vpk artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: VitaOxiPad.vpk | |
path: ./release | |
- name: Download VitaOxiPad.elf artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: VitaOxiPad.elf | |
path: ./release | |
- name: Download VitaOxiPad-x64.exe artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: VitaOxiPad-x64.exe | |
path: ./release | |
- name: Download VitaOxiPad-x32.exe artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: VitaOxiPad-x32.exe | |
path: ./release | |
- name: Upload latest stable release | |
if: ${{ github.event_name == 'release' }} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./release/* | |
tag: ${{ github.event.release.tag_name }} | |
overwrite: true | |
file_glob: true | |
prerelease: true | |
- name: Check VirusTotal secret availability | |
id: secret-check | |
shell: bash | |
run: | | |
if [ "${{ secrets.VT_API_KEY }}" != '' ]; then | |
echo "vt_available=true" >> $GITHUB_OUTPUT; | |
else | |
echo "vt_available=false" >> $GITHUB_OUTPUT; | |
fi | |
- name: VirusTotal Windows binary files scan | |
if: ${{steps.secret-check.outputs.vt_available == 'true' && github.event_name != 'pull_request' }} | |
uses: cssnr/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
update_release: true | |
file_globs: | | |
./release/VitaOxiPad-x64.exe | |
./release/VitaOxiPad-x32.exe |