Skip to content

Commit

Permalink
CI: Use tar to preset file permissions otherwise erased by GitHub's `…
Browse files Browse the repository at this point in the history
…upload-artifact`

Also removes the step that sets permissions
for the extension on macOS and Linux, as it's not
really necessary, and it was lost anyway due to
the same issue. This should affect anything.
  • Loading branch information
YuriSizov committed Jun 6, 2024
1 parent 71b7ef6 commit d0002dc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .github/actions/build-extension/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ runs:
shell: bash
run: |
strip bin/libgdsion.linux.*
chmod +x bin/libgdsion.linux.*
# macOS-specific post-build steps.

- name: Prepare the binaries (macOS)
if: ${{ env.SCONS_PLATFORM == 'macos' && inputs.finalize-binaries == 'true' }}
shell: bash
run: |
chmod +x bin/libgdsion.macos.*
# Windows-specific post-build steps.

Expand Down
3 changes: 0 additions & 3 deletions .github/actions/export-godot-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ inputs:
required: true
output:
required: true
app-name:
required: true

project-path:
default: "./example"
Expand Down Expand Up @@ -54,4 +52,3 @@ runs:
cd ${{ inputs.project-path }}/${{ env.EXPORT_OUTPUT_PATH }}
unzip ${{ inputs.output }}
rm -f ${{ inputs.output }}
chmod +x "${{ inputs.app-name }}/Contents/MacOS/$(basename "${{ inputs.app-name }}" .app)"
9 changes: 7 additions & 2 deletions .github/workflows/example-export-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
arch: ${{ matrix.arch }}
preset: ${{ matrix.preset }}
output: ${{ matrix.output }}
app-name: ${{ matrix.app-name }}

# Codesign if necessary.

Expand Down Expand Up @@ -113,9 +112,15 @@ jobs:

# Upload the results.

# This step helps to preserve file permissions.
- name: Tar up the example project
shell: bash
run: |
tar -cvf gdsion-example.tar "${{ steps.export-project-step.outputs.export-path }}"
- name: Upload the example project
uses: actions/upload-artifact@v4
with:
name: example-project-${{ matrix.platform }}-${{ matrix.arch }}
path: "${{ steps.export-project-step.outputs.export-path }}/*"
path: gdsion-example.tar
retention-days: 14
13 changes: 13 additions & 0 deletions .github/workflows/example-publish-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ jobs:
path: example/export
pattern: example-project-*

- name: Untar downloaded artifacts
shell: bash
working-directory: example/export
run: |
for name in ./*; do
if [ -d "$name" ]; then
cd "./$name"
tar -xvf gdsion-example.tar
rm -f gdsion-example.tar
cd ..
fi
done
- name: Archive example project exports
uses: ./.github/actions/zip-folder
with:
Expand Down

0 comments on commit d0002dc

Please sign in to comment.