mirror of
				https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
				synced 2025-06-27 11:58:51 +02:00 
			
		
		
		
	ci: automated release
This commit is contained in:
		
							
								
								
									
										147
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										147
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -2,7 +2,7 @@ name: "ci" | |||||||
|  |  | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches: [develop] |     branches: [develop, staging, main] | ||||||
|   pull_request: |   pull_request: | ||||||
|     branches: [develop, staging, main] |     branches: [develop, staging, main] | ||||||
|  |  | ||||||
| @@ -11,7 +11,7 @@ jobs: | |||||||
|     runs-on: "ubuntu-latest" |     runs-on: "ubuntu-latest" | ||||||
|     steps: |     steps: | ||||||
|       - uses: "actions/checkout@v4.2.2" |       - uses: "actions/checkout@v4.2.2" | ||||||
|       - uses: "wagoid/commitlint-github-action@v6.1.2" |       - uses: "wagoid/commitlint-github-action@v6.2.1" | ||||||
|  |  | ||||||
|   lint-editorconfig-checker: |   lint-editorconfig-checker: | ||||||
|     runs-on: "ubuntu-latest" |     runs-on: "ubuntu-latest" | ||||||
| @@ -20,38 +20,78 @@ jobs: | |||||||
|       - uses: "editorconfig-checker/action-editorconfig-checker@main" |       - uses: "editorconfig-checker/action-editorconfig-checker@main" | ||||||
|       - run: "editorconfig-checker" |       - run: "editorconfig-checker" | ||||||
|  |  | ||||||
|   # test: |   build-windows: | ||||||
|   #   permissions: |  | ||||||
|   #     checks: "write" |  | ||||||
|   #   runs-on: "ubuntu-latest" |  | ||||||
|   #   steps: |  | ||||||
|   #     - uses: "actions/checkout@v4.2.2" |  | ||||||
|   #       with: |  | ||||||
|   #         lfs: true |  | ||||||
|  |  | ||||||
|   #     - uses: "actions/cache@v4.2.0" |  | ||||||
|   #       with: |  | ||||||
|   #         path: "Library" |  | ||||||
|   #         key: "Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}" |  | ||||||
|   #         restore-keys: | |  | ||||||
|   #           "Library-" |  | ||||||
|  |  | ||||||
|   #     - uses: "game-ci/unity-test-runner@v4.3.1" |  | ||||||
|   #       env: |  | ||||||
|   #         UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} |  | ||||||
|   #         UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} |  | ||||||
|   #         UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} |  | ||||||
|   #       with: |  | ||||||
|   #         githubToken: ${{ secrets.GITHUB_TOKEN }} |  | ||||||
|  |  | ||||||
|   build: |  | ||||||
|     runs-on: "ubuntu-latest" |     runs-on: "ubuntu-latest" | ||||||
|  |     outputs: | ||||||
|  |       build-path: ${{ steps.upload.outputs.path }} | ||||||
|     steps: |     steps: | ||||||
|       - uses: "actions/checkout@v4.2.2" |       - uses: "actions/checkout@v4.2.2" | ||||||
|         with: |         with: | ||||||
|           lfs: true |           lfs: true | ||||||
|  |  | ||||||
|       - uses: "actions/cache@v4.2.0" |       - uses: "actions/cache@v4.2.3" | ||||||
|  |         with: | ||||||
|  |           path: "Library" | ||||||
|  |           key: "Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}" | ||||||
|  |           restore-keys: | | ||||||
|  |             "Library-" | ||||||
|  |  | ||||||
|  |       - uses: "game-ci/unity-builder@v4.3.0" | ||||||
|  |         env: | ||||||
|  |           UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||||||
|  |           UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||||||
|  |           UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||||||
|  |         with: | ||||||
|  |           targetPlatform: "StandaloneWindows64" | ||||||
|  |  | ||||||
|  |       - name: Upload Windows Build Artifact | ||||||
|  |         id: upload | ||||||
|  |         uses: actions/upload-artifact@v4.4.3 | ||||||
|  |         with: | ||||||
|  |           name: build-windows | ||||||
|  |           path: build/ | ||||||
|  |  | ||||||
|  |   build-macos: | ||||||
|  |     runs-on: "ubuntu-latest" | ||||||
|  |     outputs: | ||||||
|  |       build-path: ${{ steps.upload.outputs.path }} | ||||||
|  |     steps: | ||||||
|  |       - uses: "actions/checkout@v4.2.2" | ||||||
|  |         with: | ||||||
|  |           lfs: true | ||||||
|  |  | ||||||
|  |       - uses: "actions/cache@v4.2.3" | ||||||
|  |         with: | ||||||
|  |           path: "Library" | ||||||
|  |           key: "Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}" | ||||||
|  |           restore-keys: | | ||||||
|  |             "Library-" | ||||||
|  |  | ||||||
|  |       - uses: "game-ci/unity-builder@v4.3.0" | ||||||
|  |         env: | ||||||
|  |           UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||||||
|  |           UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||||||
|  |           UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||||||
|  |         with: | ||||||
|  |           targetPlatform: "StandaloneOSX" | ||||||
|  |  | ||||||
|  |       - name: Upload macOS Build Artifact | ||||||
|  |         id: upload | ||||||
|  |         uses: actions/upload-artifact@v4.4.3 | ||||||
|  |         with: | ||||||
|  |           name: build-macos | ||||||
|  |           path: build/ | ||||||
|  |  | ||||||
|  |   build-linux: | ||||||
|  |     runs-on: "ubuntu-latest" | ||||||
|  |     outputs: | ||||||
|  |       build-path: ${{ steps.upload.outputs.path }} | ||||||
|  |     steps: | ||||||
|  |       - uses: "actions/checkout@v4.2.2" | ||||||
|  |         with: | ||||||
|  |           lfs: true | ||||||
|  |  | ||||||
|  |       - uses: "actions/cache@v4.2.3" | ||||||
|         with: |         with: | ||||||
|           path: "Library" |           path: "Library" | ||||||
|           key: "Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}" |           key: "Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}" | ||||||
| @@ -66,7 +106,50 @@ jobs: | |||||||
|         with: |         with: | ||||||
|           targetPlatform: "StandaloneLinux64" |           targetPlatform: "StandaloneLinux64" | ||||||
|  |  | ||||||
|       # - uses: "actions/upload-artifact@v4.4.3" |       - name: Upload Linux Build Artifact | ||||||
|       #   with: |         id: upload | ||||||
|       #     name: "Build" |         uses: actions/upload-artifact@v4.6.2 | ||||||
|       #     path: "build" |         with: | ||||||
|  |           name: build-linux | ||||||
|  |           path: build/ | ||||||
|  |  | ||||||
|  |   create-release: | ||||||
|  |     needs: [build-windows, build-macos, build-linux] | ||||||
|  |     if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     steps: | ||||||
|  |       - name: Download Windows Build Artifact | ||||||
|  |         uses: actions/download-artifact@v4.3.0 | ||||||
|  |         with: | ||||||
|  |           name: build-windows | ||||||
|  |           path: build/windows | ||||||
|  |  | ||||||
|  |       - name: Download macOS Build Artifact | ||||||
|  |         uses: actions/download-artifact@v4.3.0 | ||||||
|  |         with: | ||||||
|  |           name: build-macos | ||||||
|  |           path: build/macos | ||||||
|  |  | ||||||
|  |       - name: Download Linux Build Artifact | ||||||
|  |         uses: actions/download-artifact@v4.3.0 | ||||||
|  |         with: | ||||||
|  |           name: build-linux | ||||||
|  |           path: build/linux | ||||||
|  |  | ||||||
|  |       - name: Create GitHub Release | ||||||
|  |         id: create_release | ||||||
|  |         uses: softprops/action-gh-release@v2.2.2 | ||||||
|  |         with: | ||||||
|  |           tag_name: v${{ github.run_number }} | ||||||
|  |           name: | | ||||||
|  |             ${{ github.ref == 'refs/heads/main' && 'Production Release' || 'Pre-release' }} v${{ github.run_number }} | ||||||
|  |           body: | | ||||||
|  |             🎮 Automatic ${{ github.ref == 'refs/heads/main' && 'Production' || 'Pre-release' }} build | ||||||
|  |  | ||||||
|  |             Branch: `${{ github.ref_name }}` | ||||||
|  |             Commit: `${{ github.sha }}` | ||||||
|  |           prerelease: ${{ github.ref != 'refs/heads/main' }} | ||||||
|  |           files: | | ||||||
|  |             build/windows/**/* | ||||||
|  |             build/macos/**/* | ||||||
|  |             build/linux/**/* | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user