Skip to content

Merge branch 'fix-texture-format-check' #803

Merge branch 'fix-texture-format-check'

Merge branch 'fix-texture-format-check' #803

Workflow file for this run

name: Build
# Controls when the workflow will run
on:
push:
# pull_request:
workflow_dispatch:
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: Library
key: Library-build-${{ github.ref }}
restore-keys: |
Library-build-
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
- run: vrc-get install
- name: Copy README
run: cp README.md Packages/com.github.kurotu.vrc-quest-tools/
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneWindows
unityVersion: 2019.4.31f1
buildMethod: KRT.VRCQuestTools.VRCQuestTools.Export
allowDirtyBuild: true
versioning: None
- uses: actions/upload-artifact@v4
with:
name: unitypackage
path: VRCQuestTools.unitypackage
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk:
# First public APIs
- unityVersion: 2019.4.31f1
vrcsdkVersion: 3.3.0
# Unity 2019 last SDK
- unityVersion: 2019.4.31f1
vrcsdkVersion: 3.4.2
# Unity 2022 first SDK
- unityVersion: 2022.3.6f1
vrcsdkVersion: 3.5.0
# VRC Constraints
- unityVersion: 2022.3.22f1
vrcsdkVersion: 3.6.2-constraints.3
ndmfVersion:
- ''
- 1.2.5
- 1.3.0
- latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: Library
key: Library-test-${{ matrix.sdk.unityVersion }}-${{ matrix.sdk.vrcsdkVersion }}-${{ github.ref }}
restore-keys: |
Library-test-${{ matrix.sdk.unityVersion }}-${{ matrix.sdk.vrcsdkVersion }}
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
- run: rm -r Packages/vpm-manifest.json Packages/com.vrchat.avatars Packages/com.vrchat.base
- run: vrc-get install -y com.vrchat.base ${{ matrix.sdk.vrcsdkVersion }}
- run: vrc-get install -y com.vrchat.avatars ${{ matrix.sdk.vrcsdkVersion }}
- run: vrc-get repo add https://vpm.nadena.dev/vpm-prerelease.json
- run: if [ -n "${{ matrix.ndmfVersion}}" ]; then scripts/vrc-get-install.sh nadena.dev.ndmf ${{ matrix.ndmfVersion }}; fi
- run: cat Packages/vpm-manifest.json
- uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
unityVersion: ${{ matrix.sdk.unityVersion }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: "Test Results: ${{ matrix.sdk.unityVersion }}, vrcsdk-${{ matrix.sdk.vrcsdkVersion }}, ndmf-${{ matrix.ndmfVersion }}"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.x
- name: Restore dependencies
run: dotnet tool restore
- name: Check style
run: dotnet style check -r stylecop.ruleset -j stylecop.json . > result.txt
- name: Report result
run: if [ "$(wc -l < result.txt)" = "0" ]; then true; else cat result.txt && false; fi
vpm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Copy README
run: cp README.md Packages/com.github.kurotu.vrc-quest-tools/
- name: Make zip
run: |
cd Packages/com.github.kurotu.vrc-quest-tools
zip -r ../../$(jq -r '.name' package.json)-$(jq -r '.version' package.json).zip $(ls)
- uses: actions/upload-artifact@v4
with:
name: vpm
path: "*.zip"
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: 'npm'
cache-dependency-path: Website/package-lock.json
- run: cd Website && npm ci
- run: cd Website && npm run build
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build, test, lint, vpm, docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: unitypackage
- uses: actions/download-artifact@v4
with:
name: vpm
- name: Create release artifact
id: artifact
run: |
NAME=VRCQuestTools-${GITHUB_REF#refs/tags/}
mkdir ${NAME}
cp VRCQuestTools.unitypackage ${NAME}/${NAME}.unitypackage
cp LICENSE.txt ${NAME}/
cp README*.md ${NAME}/
cp .github/workflows/Add\ to\ VCC.url ${NAME}/
zip -r ${NAME}.zip ${NAME}
echo "::set-output name=artifact-name::${NAME}"
- name: Generate release note
run: ./scripts/generate-releasenote.sh ${GITHUB_REF#refs/tags/v} | tee ${{ github.workspace }}-release.txt
- uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-release.txt
draft: true
files: |
Packages/com.github.kurotu.vrc-quest-tools/package.json
*.zip
${{ steps.artifact.outputs.artifact-name }}/${{ steps.artifact.outputs.artifact-name }}.unitypackage