commit 01d6663f486f06dd53726af7df81bbdf3b820e80 Author: Scion Date: Fri Jul 11 00:42:28 2025 -0700 Initial commit. diff --git a/.github/workflows/builds/unity.yaml b/.github/workflows/builds/unity.yaml new file mode 100644 index 0000000..fbafb56 --- /dev/null +++ b/.github/workflows/builds/unity.yaml @@ -0,0 +1,72 @@ +name: "Unity Build Workflow" +on: + workflow_call: + workflow_dispatch: + +env: + UNITY_COMPRESSION_LEVEL: lz4hc + UNITY_ZIP_ON_COMPLETE: false + UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + NO_GRAPHICS: ${{ vars.NO_GRAPHICS && vars.NO_GRAPHICS || 'true' }} + + UNITY_KEYSTORE_PATH: ${{ vars.UNITY_KEYSTORE_PATH && vars.UNITY_KEYSTORE_PATH || 'studiowhy.keystore' }} + UNITY_KEYSTORE_KEY_ALIAS: ${{ vars.UNITY_KEYSTORE_ALIAS && vars.UNITY_KEYSTORE_ALIAS || 'studiowhy' }} + UNITY_KEYSTORE_PASSWORD: ${{ secrets.UNITY_KEYSTORE_PASSWORD }} + UNITY_KEYSTORE_KEY_PASSWORD: ${{ secrets.UNITY_KEYSTORE_KEY_PASSWORD }} +jobs: + build-unity-master1: + name: "Build ${{ matrix.platform.os }}" + runs-on: master1 + strategy: + max-parallel: 1 + matrix: + platform: + - os: Windows + method: StudioWhy.BatchBuild.BuildWindows + - os: Windows32Bit + method: StudioWhy.BatchBuild.BuildWindows32Bit + suffix: Windows_32bit + - os: WindowsARM + method: StudioWhy.BatchBuild.BuildWindowsArm + suffix: Windows_ARM + steps: + - name: "Checkout" + uses: https://github.com/actions/checkout@v3 + - name: "Build Unity Project" + uses: act/unity/unity-project-cached-artifacts@master + with: + platform: ${{ matrix.platform.os }} + email: ${{ env.UNITY_USERNAME }} + password: ${{ env.UNITY_PASSWORD }} + executeMethod: ${{ matrix.platform.method }} + noGraphics: true + artifactSuffix: ${{ matrix.platform.suffix || matrix.platform.os }} + compression-level: 9 + + build-unity-master2: + name: "Build ${{ matrix.platform.os }}" + runs-on: master2 + strategy: + max-parallel: 1 + matrix: + platform: + - os: OSX + method: StudioWhy.BatchBuild.BuildOSX + - os: Linux + method: StudioWhy.BatchBuild.BuildLinux + - os: Android + method: StudioWhy.BatchBuild.BuildAndroid + steps: + - name: "Checkout" + uses: https://github.com/actions/checkout@v3 + - name: "Build Unity Project" + uses: act/unity/unity-project-cached-artifacts@master + with: + platform: ${{ matrix.platform.os }} + email: ${{ env.UNITY_USERNAME }} + password: ${{ env.UNITY_PASSWORD }} + executeMethod: ${{ matrix.platform.method }} + noGraphics: true + artifactSuffix: ${{ matrix.platform.suffix || matrix.platform.os }} + compression-level: 9 diff --git a/.github/workflows/deployments/itchio.yaml b/.github/workflows/deployments/itchio.yaml new file mode 100644 index 0000000..d27f254 --- /dev/null +++ b/.github/workflows/deployments/itchio.yaml @@ -0,0 +1,77 @@ +name: "Itch.io Deployment Workflow" +on: + workflow_call: + inputs: + version: + description: 'Version' + required: true + type: string + workflow_dispatch: + inputs: + version: + description: 'Version' + required: true + type: string + +env: + BUILD_WORKFLOW_NAME: builds/unity.yaml + RELEASE_VERSION: ${{ inputs.version }} + ITCH_API_KEY: ${{ secrets.ITCH_API_KEY }} + ITCH_ACCOUNT: ${{ vars.ITCH_ACCOUNT }} + ITCH_PROJECT: ${{ vars.ITCH_PROJECT }} + +jobs: + itchio-master1: + runs-on: master1 + name: "Upload ${{ matrix.releases.channel }}" + strategy: + max-parallel: 3 + matrix: + releases: + - pattern: 'Windows' + channel: win64 + - pattern: 'Windows_ARM' + channel: winARM + - pattern: 'Windows_32bit' + channel: win32 + steps: + - uses: act/common/itchio/butler-push-previous-artifacts@master + with: + workflowPattern: ${{ env.BUILD_WORKFLOW_NAME }} + artifactPattern: "*${{ matrix.releases.pattern }}" + password: ${{ secrets.PACKAGE_APIKEY }} + unzipDir: ${{ matrix.releases.unzipDir }} + unzipPattern: ${{ matrix.releases.unzipPattern }} + account: ${{ env.ITCH_ACCOUNT }} + project: ${{ env.ITCH_PROJECT }} + channel: ${{ matrix.releases.channel }} + apiKey: ${{ env.ITCH_API_KEY }} + version: ${{ env.RELEASE_VERSION }} + itchio-master2: + runs-on: master2 + name: "Upload ${{ matrix.releases.channel }}" + strategy: + max-parallel: 3 + matrix: + releases: + - pattern: 'OSX' + channel: osx + - pattern: 'Linux' + channel: linux + - pattern: 'Android' + channel: android + unzipDir: Android + unzipPattern: '*.apk' + steps: + - uses: act/common/itchio/butler-push-previous-artifacts@master + with: + workflowPattern: ${{ env.BUILD_WORKFLOW_NAME }} + artifactPattern: "*${{ matrix.releases.pattern }}" + password: ${{ secrets.PACKAGE_APIKEY }} + unzipDir: ${{ matrix.releases.unzipDir }} + unzipPattern: ${{ matrix.releases.unzipPattern }} + account: ${{ env.ITCH_ACCOUNT }} + project: ${{ env.ITCH_PROJECT }} + channel: ${{ matrix.releases.channel }} + apiKey: ${{ env.ITCH_API_KEY }} + version: ${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/deployments/minio.yaml b/.github/workflows/deployments/minio.yaml new file mode 100644 index 0000000..9201af6 --- /dev/null +++ b/.github/workflows/deployments/minio.yaml @@ -0,0 +1,73 @@ +name: "MinIO Deployment Workflow" +on: + workflow_call: + inputs: + version: + description: 'Version' + required: true + type: string + workflow_dispatch: + inputs: + version: + description: 'Version' + required: true + type: string + +env: + BUILD_WORKFLOW_NAME: builds/unity.yaml + RELEASE_VERSION: ${{ inputs.version }} + MINIO_URL: ${{ vars.MINIO_URL && vars.MINIO_URL || 'https://minio.studiowhy.net' }} + MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} + MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} + MINIO_BUCKET: ${{ vars.MINIO_BUCKET && vars.MINIO_BUCKET || 'releases' }} +jobs: + minio-master1: + runs-on: master1 + name: "Upload ${{ matrix.releases.pattern }}" + strategy: + max-parallel: 3 + matrix: + releases: + - pattern: 'Windows' + - pattern: 'Windows_ARM' + - pattern: 'Windows_32bit' + steps: + - uses: act/common/minio/mc-cp-previous-artifacts@master + with: + workflowPattern: ${{ env.BUILD_WORKFLOW_NAME }} + artifactPattern: "*${{ matrix.releases.pattern }}" + password: ${{ secrets.PACKAGE_APIKEY }} + unzipDir: ${{ matrix.releases.unzipDir }} + unzipPattern: ${{ matrix.releases.unzipPattern }} + destBucket: ${{ env.MINIO_BUCKET }} + minioAccessKey: ${{ env.MINIO_ACCESS_KEY }} + minioSecretKey: ${{ env.MINIO_SECRET_KEY }} + url: ${{ env.MINIO_URL }} + version: ${{ env.RELEASE_VERSION }} + useRepoAsBucket: true + minio-master2: + runs-on: master2 + name: "Upload ${{ matrix.releases.pattern }}" + strategy: + max-parallel: 3 + matrix: + releases: + - pattern: 'OSX' + - pattern: 'Linux' + - pattern: 'Android' + unzipDir: Android + unzipPattern: '*.apk' + steps: + - uses: act/common/minio/mc-cp-previous-artifacts@master + with: + workflowPattern: ${{ env.BUILD_WORKFLOW_NAME }} + artifactPattern: "*${{ matrix.releases.pattern }}" + password: ${{ secrets.PACKAGE_APIKEY }} + unzipDir: ${{ matrix.releases.unzipDir }} + unzipPattern: ${{ matrix.releases.unzipPattern }} + destBucket: ${{ env.MINIO_BUCKET }} + minioAccessKey: ${{ env.MINIO_ACCESS_KEY }} + minioSecretKey: ${{ env.MINIO_SECRET_KEY }} + url: ${{ env.MINIO_URL }} + version: ${{ env.RELEASE_VERSION }} + useRepoAsBucket: true