mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 19:50:38 +02:00
Merge pull request #251 from JulianGro/GHA-asset-upload
Use GitHub Actions artifact storage
This commit is contained in:
commit
918452d02c
1 changed files with 13 additions and 22 deletions
35
.github/workflows/pr_build.yml
vendored
35
.github/workflows/pr_build.yml
vendored
|
@ -64,8 +64,7 @@ jobs:
|
||||||
id: buildenv1
|
id: buildenv1
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
echo "UPLOAD_PREFIX=build/overte/PR" >> $GITHUB_ENV
|
echo "{github_sha_short}={`echo $GIT_COMMIT | cut -c1-7`}" >> $GITHUB_OUTPUT
|
||||||
echo ::set-output name=github_sha_short::`echo $GIT_COMMIT | cut -c1-7`
|
|
||||||
echo "JOB_NAME=${{matrix.os}}, ${{matrix.build_type}}" >> $GITHUB_ENV
|
echo "JOB_NAME=${{matrix.os}}, ${{matrix.build_type}}" >> $GITHUB_ENV
|
||||||
echo "APP_TARGET_NAME=$APP_NAME" >> $GITHUB_ENV
|
echo "APP_TARGET_NAME=$APP_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
@ -138,16 +137,12 @@ jobs:
|
||||||
echo "${{ steps.buildenv1.outputs.symbols_archive }}"
|
echo "${{ steps.buildenv1.outputs.symbols_archive }}"
|
||||||
# Setting short commit SHA for use as RELEASE_NAME in generated installers.
|
# Setting short commit SHA for use as RELEASE_NAME in generated installers.
|
||||||
echo "GIT_COMMIT_SHORT=${{ steps.buildenv1.outputs.github_sha_short }}" >> $GITHUB_ENV
|
echo "GIT_COMMIT_SHORT=${{ steps.buildenv1.outputs.github_sha_short }}" >> $GITHUB_ENV
|
||||||
if [[ "${{ matrix.build_type }}" != "android" ]]; then
|
if [ "${{ matrix.build_type }}" = "full" ]; then
|
||||||
if [ "${{ matrix.build_type }}" = "full" ]; then
|
echo "ARTIFACT_PATTERN=Overte-PR${{ github.event.number }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
echo "ARTIFACT_PATTERN=Overte-PR${{ github.event.number }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
echo "INSTALLER=Overte-$RELEASE_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
echo "INSTALLER=Overte-$RELEASE_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "ARTIFACT_PATTERN=Overte-Interface-PR${{ github.event.number }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
|
||||||
echo "INSTALLER=Overte-Interface-$RELEASE_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "ARTIFACT_PATTERN=*.$INSTALLER_EXT" >> $GITHUB_ENV
|
echo "ARTIFACT_PATTERN=Overte-Interface-PR${{ github.event.number }}-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
|
echo "INSTALLER=Overte-Interface-$RELEASE_NUMBER-${{ steps.buildenv1.outputs.github_sha_short }}.$INSTALLER_EXT" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Clear Working Directory
|
- name: Clear Working Directory
|
||||||
|
@ -233,7 +228,7 @@ jobs:
|
||||||
|
|
||||||
- name: Archive cmake logs
|
- name: Archive cmake logs
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
|
name: cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
|
||||||
path: ${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
|
path: ${{ runner.workspace }}/cmake-logs-${{ matrix.os }}-${{ github.event.number }}.tar.xz
|
||||||
|
@ -329,13 +324,9 @@ jobs:
|
||||||
run: cat ./_CPack_Packages/win64/NSIS/NSISOutput.log
|
run: cat ./_CPack_Packages/win64/NSIS/NSISOutput.log
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS') || matrix.build_type == 'android' # Automatic Linux packaging is not implemented
|
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macOS')
|
||||||
shell: bash
|
uses: actions/upload-artifact@v3
|
||||||
working-directory: ${{runner.workspace}}/build
|
with:
|
||||||
env:
|
name: ${{ env.ARTIFACT_PATTERN }}
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
path: ${{ runner.workspace }}/build/${{ env.ARTIFACT_PATTERN }}
|
||||||
run: |
|
if-no-files-found: error
|
||||||
if [[ "${{ matrix.build_type }}" == "android" ]]; then
|
|
||||||
cd $GITHUB_WORKSPACE/android
|
|
||||||
fi
|
|
||||||
$PYTHON_EXEC "$GITHUB_WORKSPACE/tools/ci-scripts/upload_to_publish_server.py"
|
|
||||||
|
|
Loading…
Reference in a new issue