diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b1e456..afac0f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release to GitHub +name: Release on: workflow_dispatch @@ -99,6 +99,11 @@ jobs: versioning: Custom version: ${{ needs.release.outputs.version }} buildMethod: Editor.BuildScript.Build + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} - name: Create zip archive run: | cd build/${{ matrix.targetPlatform }} @@ -117,3 +122,38 @@ jobs: name, data: require("fs").readFileSync("artifact.zip"), }); + steam: + name: Deploy to Steam + needs: [ build ] + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Download StandaloneWindows64 Artifact + uses: actions/download-artifact@v3 + with: + name: Build-StandaloneWindows64 + path: build/StandaloneWindows64 + - name: Download StandaloneLinux64 Artifact + uses: actions/download-artifact@v3 + with: + name: Build-StandaloneLinux64 + path: build/StandaloneLinux64 + - name: Download StandaloneOSX Artifact + uses: actions/download-artifact@v3 + with: + name: Build-StandaloneOSX + path: build/StandaloneOSX + - uses: game-ci/steam-deploy@v3 + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF}} + appId: ${{ secrets.STEAM_APP_ID }} + buildDescription: v${{ needs.build.outputs.buildVersion }} + rootPath: build + depot1Path: StandaloneWindows64 + depot2Path: StandaloneLinux64 + depot3Path: StandaloneOSX + releaseBranch: prerelease diff --git a/.github/workflows/steam.yml b/.github/workflows/steam.yml deleted file mode 100644 index 265d5ca..0000000 --- a/.github/workflows/steam.yml +++ /dev/null @@ -1,96 +0,0 @@ -name: Release to Steam - -on: workflow_dispatch - -permissions: - contents: write - -jobs: - fmod: - name: Build FMOD - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: ./.github/actions/fmod - - uses: actions/upload-artifact@v3 - with: - name: FMOD Build - path: .fmod/Build - build: - name: Build for ${{ matrix.targetPlatform }} - needs: [ fmod ] - runs-on: ubuntu-latest - strategy: - matrix: - targetPlatform: - - StandaloneWindows64 - - StandaloneLinux64 - - StandaloneOSX - outputs: - buildVersion: ${{ steps.build.outputs.buildVersion }} - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: actions/cache@v3 - with: - path: Library - key: Library-${{ matrix.targetPlatform }} - restore-keys: Library- - - uses: actions/download-artifact@v3 - with: - name: FMOD Build - path: .fmod/Build - - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - gitPrivateToken: ${{ secrets.PACKAGES_TOKEN }} - unityVersion: 2022.3.6f1 - targetPlatform: ${{ matrix.targetPlatform }} - versioning: Custom - version: ${{ needs.release.outputs.version }} - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: Build-${{ matrix.targetPlatform }} - path: build/${{ matrix.targetPlatform }} - release: - name: Release to Steam - needs: [ build ] - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Download StandaloneWindows64 Artifact - uses: actions/download-artifact@v3 - with: - name: Build-StandaloneWindows64 - path: build/StandaloneWindows64 - - name: Download StandaloneLinux64 Artifact - uses: actions/download-artifact@v3 - with: - name: Build-StandaloneLinux64 - path: build/StandaloneLinux64 - - name: Download StandaloneOSX Artifact - uses: actions/download-artifact@v3 - with: - name: Build-StandaloneOSX - path: build/StandaloneOSX - - uses: game-ci/steam-deploy@v3 - with: - username: ${{ secrets.STEAM_USERNAME }} - configVdf: ${{ secrets.STEAM_CONFIG_VDF}} - appId: ${{ secrets.STEAM_APP_ID }} - buildDescription: v${{ needs.build.outputs.buildVersion }} - rootPath: build - depot1Path: StandaloneWindows64 - depot2Path: StandaloneLinux64 - depot3Path: StandaloneOSX - releaseBranch: prerelease