generated from krampus/template-godot4
	Compare commits
	
		
			No commits in common. "dd15c88585ebfea599b83e93763bd400aef09172" and "0acfa25b1960d70f81d97a50bbe8b20e13623a62" have entirely different histories.
		
	
	
		
			dd15c88585
			...
			0acfa25b19
		
	
		
| @ -1,56 +0,0 @@ | |||||||
| # Based on https://github.com/aBARICHELLO/godot-ci/blob/master/.github/workflows/godot-ci.yml |  | ||||||
| name: GFOLF - itch.io publish action |  | ||||||
| run-name: ${{ gitea.actor }} is publishing GFOLF ${{ gitea.ref_name }} to itch.io. |  | ||||||
| 
 |  | ||||||
| on: |  | ||||||
|   push: |  | ||||||
|     branches: |  | ||||||
|       - ci-test |  | ||||||
|     tags: |  | ||||||
|       - v* |  | ||||||
| 
 |  | ||||||
| env: |  | ||||||
|   GODOT_VERSION: 4.3 |  | ||||||
|   EXPORT_NAME: gfolf |  | ||||||
|   PROJECT_PATH: . |  | ||||||
| 
 |  | ||||||
| jobs: |  | ||||||
|   build: |  | ||||||
|     runs-on: ubuntu-20.04 |  | ||||||
|     container: |  | ||||||
|       image: barichello/godot-ci:4.3 |  | ||||||
|     strategy: |  | ||||||
|       matrix: |  | ||||||
|         include: |  | ||||||
|           - target: linux64 |  | ||||||
|             type: x86_64 |  | ||||||
|           - target: osx |  | ||||||
|             type: app |  | ||||||
|           - target: win64 |  | ||||||
|             type: exe |  | ||||||
|     env: |  | ||||||
|       BUILD_DIR: build/gfolf_${{ gitea.ref_name }}_${{ matrix.target }} |  | ||||||
|     steps: |  | ||||||
|       - name: Checkout repository |  | ||||||
|         run: | |  | ||||||
|           git init |  | ||||||
|           git remote add origin ${{ gitea.event.repository.clone_url }} |  | ||||||
|           git fetch --depth 1 origin ${{ gitea.ref }} |  | ||||||
|           git checkout FETCH_HEAD |  | ||||||
|           git lfs pull |  | ||||||
|       - name: Reimport assets |  | ||||||
|         # bruh are you fucking kidding me. bruhh |  | ||||||
|         run: | |  | ||||||
|           timeout 10 godot --headless --import || true |  | ||||||
|           godot --headless --import |  | ||||||
|       - name: Build project |  | ||||||
|         run: | |  | ||||||
|           echo "building to $BUILD_DIR" |  | ||||||
|           mkdir -p $BUILD_DIR |  | ||||||
|           godot --headless --export-debug ${{ matrix.target }} $BUILD_DIR/gfolf.${{ matrix.type }} |  | ||||||
|       - name: Publish |  | ||||||
|         run: | |  | ||||||
|           echo "pushing $BUILD_DIR" |  | ||||||
|           butler push $BUILD_DIR tetramorph/gfolf:${{ matrix.target }} --userversion ${{ gitea.ref_name }} |  | ||||||
|         env: |  | ||||||
|           BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} |  | ||||||
| @ -47,8 +47,9 @@ echo "Packaging to: $BUILD_DIR" | |||||||
| ## Shared build logic | ## Shared build logic | ||||||
| function build_project { | function build_project { | ||||||
|     TARGET="$1" |     TARGET="$1" | ||||||
|  |     TARGET_SHORT="$2" | ||||||
|     TARGET_EXT="$3" |     TARGET_EXT="$3" | ||||||
|     TARGET_SUBDIR="$PROJECT_NAME""_$TARGET" |     TARGET_SUBDIR="$PROJECT_NAME""_$TARGET_SHORT" | ||||||
|     TARGET_DIR="$BUILD_DIR/$TARGET_SUBDIR" |     TARGET_DIR="$BUILD_DIR/$TARGET_SUBDIR" | ||||||
|     TARGET_OUT="$TARGET_DIR/$PROJECT_NAME.$TARGET_EXT" |     TARGET_OUT="$TARGET_DIR/$PROJECT_NAME.$TARGET_EXT" | ||||||
| 
 | 
 | ||||||
| @ -60,7 +61,7 @@ function build_project { | |||||||
|     godot --headless --export-debug "$TARGET" $TARGET_OUT |     godot --headless --export-debug "$TARGET" $TARGET_OUT | ||||||
|     set +x |     set +x | ||||||
| 
 | 
 | ||||||
|     ZIP_OUT="$PROJECT_NAME""_$VERSION_TAG""_$TARGET.7z" |     ZIP_OUT="$PROJECT_NAME""_$VERSION_TAG""_$TARGET_SHORT.7z" | ||||||
|     echo "Packaging to: $ZIP_OUT" |     echo "Packaging to: $ZIP_OUT" | ||||||
|     # TODO |     # TODO | ||||||
| 
 | 
 | ||||||
| @ -71,10 +72,10 @@ function build_project { | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Build linux | # Build linux | ||||||
| build_project "linux64" "x86_64" | build_project "Linux" "linux64" "x86_64" | ||||||
| 
 | 
 | ||||||
| # Build OSX | # Build OSX | ||||||
| build_project "osx" "app" | build_project "macOS" "osx" "app" | ||||||
| 
 | 
 | ||||||
| # Build Michaelsoft Binbows | # Build Michaelsoft Binbows | ||||||
| build_project "win64" "exe" | build_project "Windows Desktop" "win64" "exe" | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| [preset.0] | [preset.0] | ||||||
| 
 | 
 | ||||||
| name="linux64" | name="Linux" | ||||||
| platform="Linux" | platform="Linux" | ||||||
| runnable=true | runnable=true | ||||||
| advanced_options=true | advanced_options=true | ||||||
| @ -40,7 +40,7 @@ rm -rf \"{temp_dir}\"" | |||||||
| 
 | 
 | ||||||
| [preset.1] | [preset.1] | ||||||
| 
 | 
 | ||||||
| name="win64" | name="Windows Desktop" | ||||||
| platform="Windows Desktop" | platform="Windows Desktop" | ||||||
| runnable=true | runnable=true | ||||||
| advanced_options=true | advanced_options=true | ||||||
| @ -105,7 +105,7 @@ Remove-Item -Recurse -Force '{temp_dir}'" | |||||||
| 
 | 
 | ||||||
| [preset.2] | [preset.2] | ||||||
| 
 | 
 | ||||||
| name="osx" | name="macOS" | ||||||
| platform="macOS" | platform="macOS" | ||||||
| runnable=true | runnable=true | ||||||
| advanced_options=true | advanced_options=true | ||||||
|  | |||||||
| @ -9,16 +9,14 @@ func _ready() -> void: | |||||||
| 	# Fall back on baked version info | 	# Fall back on baked version info | ||||||
| 	text = Game.settings.version | 	text = Game.settings.version | ||||||
| 
 | 
 | ||||||
| 	# Try to expand on version number if running from the editor | 	var output: Array[String] = [] | ||||||
| 	if OS.has_feature("editor"): | 	var status := OS.execute("git", ["describe", "--always", "HEAD"], output) | ||||||
| 		var output: Array[String] = [] | 	if status == 0: | ||||||
| 		var status := OS.execute("git", ["describe", "--always", "HEAD"], output) | 		text = output[0].strip_edges() | ||||||
| 		if status == 0: |  | ||||||
| 			text = output[0].strip_edges() |  | ||||||
| 
 | 
 | ||||||
| 		output = [] | 	output = [] | ||||||
| 		status = OS.execute("git", ["branch", "--show-current"], output) | 	status = OS.execute("git", ["branch", "--show-current"], output) | ||||||
| 		if status == 0: | 	if status == 0: | ||||||
| 			var branch_name := output[0].strip_edges() | 		var branch_name := output[0].strip_edges() | ||||||
| 			if branch_name and not branch_name in IGNORED_BRANCHES: | 		if branch_name and not branch_name in IGNORED_BRANCHES: | ||||||
| 				text += " (%s)" % branch_name | 			text += " (%s)" % branch_name | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user