Skip to content

Commit

Permalink
Use our own upload and download actions so we have sensible defaults …
Browse files Browse the repository at this point in the history
…for paths
  • Loading branch information
chippmann committed May 16, 2024
1 parent 38f9b86 commit 4d9a063
Show file tree
Hide file tree
Showing 18 changed files with 92 additions and 55 deletions.
18 changes: 18 additions & 0 deletions .github/actions/download-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Download Godot artifact
description: Download the Godot artifact.
inputs:
name:
description: The artifact name.
default: "${{ github.job }}"
path:
description: The path to download and extract to.
required: true
default: "./"
runs:
using: "composite"
steps:
- name: Download Godot Artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
19 changes: 19 additions & 0 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Upload Godot artifact
description: Upload the Godot artifact.
inputs:
name:
description: The artifact name.
default: "${{ github.job }}"
path:
description: The path to upload.
required: true
default: "bin/*"
runs:
using: "composite"
steps:
- name: Upload Godot Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
retention-days: 14
16 changes: 8 additions & 8 deletions .github/workflows/assemble_export_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
shell: bash

- name: Download android export templates
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_android_all
path: android_templates/
Expand All @@ -34,7 +34,7 @@ jobs:
cp android_templates/android_release.apk templates/android_release.apk
- name: Download ios export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_all_ios

Expand All @@ -43,7 +43,7 @@ jobs:
run: mv export_template_all_ios.zip templates/ios.zip

- name: Download linux x86_64 debug export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_debug_linux_x86_64

Expand All @@ -52,7 +52,7 @@ jobs:
run: mv godot.linuxbsd.template_debug.x86_64 templates/linux_debug.x86_64

- name: Download linux x86_64 release export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_release_linux_x86_64

Expand All @@ -61,7 +61,7 @@ jobs:
run: mv godot.linuxbsd.template_release.x86_64 templates/linux_release.x86_64

- name: Download windows x86_64 debug export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_debug_windows_x86_64

Expand All @@ -70,7 +70,7 @@ jobs:
run: mv godot.windows.template_debug.x86_64.exe templates/windows_debug_x86_64.exe

- name: Download windows x86_64 release export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_release_windows_x86_64

Expand All @@ -79,7 +79,7 @@ jobs:
run: mv godot.windows.template_release.x86_64.exe templates/windows_release_x86_64.exe

- name: Download macos debug export template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_all_macos

Expand All @@ -101,7 +101,7 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: godot-kotlin-jvm_export_templates_${{ inputs.godot-kotlin-jvm-version }}.tpz
path: templates/godot-kotlin-jvm_export_templates_${{ inputs.godot-kotlin-jvm-version }}.tpz
4 changes: 2 additions & 2 deletions .github/workflows/assemble_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: ./.github/actions/godot-deps

- name: Download ios export template binaries
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_ios_all

Expand All @@ -51,7 +51,7 @@ jobs:
zip -q -9 -r export_template_all_ios.zip ios_xcode
- name: Upload iOS template app
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: export_template_all_ios
path: export_template_all_ios.zip
6 changes: 3 additions & 3 deletions .github/workflows/assemble_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
arch: x86_64
steps:
- name: Download ${{ matrix.target }} editor
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: editor_${{ matrix.target }}_linux_${{ matrix.arch }}
path: godot-kotlin-jvm_editor_linuxbsd_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}

- name: Download ${{ matrix.target }} bootstrap jar
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: jvm_godot-bootstrap_${{ matrix.target }}
path: godot-kotlin-jvm_editor_linuxbsd_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}
Expand All @@ -46,7 +46,7 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: godot-kotlin-jvm_editor_linuxbsd_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
path: godot-kotlin-jvm_editor_linuxbsd_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}/godot-kotlin-jvm_editor_linuxbsd_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
24 changes: 12 additions & 12 deletions .github/workflows/assemble_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:
uses: actions/checkout@v4

- name: Download ${{ matrix.target }} x86_64 editor
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: editor_${{ matrix.target }}_macos_x86_64

- name: Download ${{ matrix.target }} arm64 editor
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: editor_${{ matrix.target }}_macos_arm64

Expand All @@ -52,7 +52,7 @@ jobs:
universal-output-binary: godot.macos.editor.${{ matrix.target }}.universal

- name: Upload ${{ matrix.target }} macos universal artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: editor_${{ matrix.target }}_macos_universal
path: godot.macos.editor.${{ matrix.target }}.universal
Expand Down Expand Up @@ -80,13 +80,13 @@ jobs:
ref: ${{ inputs.godot-version }}

- name: Download ${{ matrix.target }} editor
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: editor_${{ matrix.target }}_macos_universal
path: .

- name: Download ${{ matrix.target }} bootstrap jar
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: jvm_godot-bootstrap_${{ matrix.target }}
path: .
Expand All @@ -103,7 +103,7 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: godot-kotlin-jvm_editor_macos_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
path: godot-kotlin-jvm_editor_macos_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
Expand All @@ -126,12 +126,12 @@ jobs:
uses: actions/checkout@v4

- name: Download ${{ matrix.target }} x86_64 export_template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_${{ matrix.target }}_macos_x86_64

- name: Download ${{ matrix.target }} arm64 export_template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_${{ matrix.target }}_macos_arm64

Expand All @@ -143,7 +143,7 @@ jobs:
universal-output-binary: godot.macos.template_${{ matrix.target }}.universal

- name: Upload ${{ matrix.target }} macos universal artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: export_template_${{ matrix.target }}_macos_universal
path: godot.macos.template_${{ matrix.target }}.universal
Expand All @@ -160,13 +160,13 @@ jobs:
ref: ${{ inputs.godot-version }}

- name: Download debug export_template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_debug_macos_universal
path: .

- name: Download release export_template
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: export_template_release_macos_universal
path: .
Expand All @@ -182,7 +182,7 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: export_template_all_macos
path: export_template_all_macos.zip
6 changes: 3 additions & 3 deletions .github/workflows/assemble_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
arch: x86_64
steps:
- name: Download ${{ matrix.target }} editor
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: editor_${{ matrix.target }}_windows_${{ matrix.arch }}
path: godot-kotlin-jvm_editor_windows_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}

- name: Download ${{ matrix.target }} bootstrap jar
uses: actions/download-artifact@v4
uses: ./.github/actions/download-artifact
with:
name: jvm_godot-bootstrap_${{ matrix.target }}
path: godot-kotlin-jvm_editor_windows_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}
Expand All @@ -47,7 +47,7 @@ jobs:
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: godot-kotlin-jvm_editor_windows_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
path: godot-kotlin-jvm_editor_windows_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}/godot-kotlin-jvm_editor_windows_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
2 changes: 1 addition & 1 deletion .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ jobs:
ls -l bin/
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: export_template_android_all
2 changes: 1 addition & 1 deletion .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ jobs:
target: template_debug

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: export_template_ios_all
18 changes: 9 additions & 9 deletions .github/workflows/build_jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,49 +44,49 @@ jobs:
modules/kotlin_jvm/kt/gradlew -p modules/kotlin_jvm/kt/ build -Prelease
- name: Upload api-generator artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_api-generator
path: modules/kotlin_jvm/kt/api-generator/build/libs/api-generator.jar

- name: Upload release bootstrap artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_godot-bootstrap_release
path: modules/kotlin_jvm/kt/godot-library/build/libs/godot-bootstrap.jar

- name: Upload entry-generator artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_entry-generator
path: modules/kotlin_jvm/kt/entry-generation/godot-entry-generator/build/libs/godot-entry-generator-*.jar

- name: Upload ksp-symbol-processor artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_ksp-symbol-processor
path: modules/kotlin_jvm/kt/entry-generation/godot-kotlin-symbol-processor/build/libs/godot-kotlin-symbol-processor-*.jar

- name: Upload gradle-plugin artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_gradle-plugin
path: modules/kotlin_jvm/kt/plugins/godot-gradle-plugin/build/libs/godot-gradle-plugin-*.jar

- name: Upload intellij-plugin artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_intellij-plugin
path: modules/kotlin_jvm/kt/plugins/godot-intellij-plugin/build/distributions/godot-jvm-idea-plugin-*.zip

- name: Upload plugins-common artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_plugins-common
path: modules/kotlin_jvm/kt/plugins/godot-plugins-common/build/libs/godot-plugins-common-*.jar

- name: Upload tools-common artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_tools-common
path: modules/kotlin_jvm/kt/tools-common/build/libs/tools-common-*.jar
Expand All @@ -96,7 +96,7 @@ jobs:
modules/kotlin_jvm/kt/gradlew -p modules/kotlin_jvm/kt/ build -Pdebug
- name: Upload debug bootstrap artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: jvm_godot-bootstrap_debug
path: modules/kotlin_jvm/kt/godot-library/build/libs/godot-bootstrap.jar
2 changes: 1 addition & 1 deletion .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ jobs:
chmod +x bin/godot.*
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
2 changes: 1 addition & 1 deletion .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ jobs:
chmod +x bin/godot.*
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ jobs:
Remove-Item bin/* -Include *.pdb -Force
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
Loading

0 comments on commit 4d9a063

Please sign in to comment.