From 970f8c6dcd4e2343ed5845fd56bd829c7dd5f301 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Fri, 20 Aug 2021 19:57:20 +0200 Subject: [PATCH] upload iOS and switch builds to S3 --- .github/workflows/c-cpp.yml | 2 +- .github/workflows/switch.yml | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 41f8bdf9e..81ffebb05 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -12,7 +12,7 @@ jobs: config: - {name: i686-pc-windows-msvc, os: windows-latest, cmakeArgs: -DCMAKE_SYSTEM_VERSION="10.0.18362.0" -G "Visual Studio 16 2019" -A Win32, buildType: Release} - {name: apple-darwin, os: macos-latest, cmakeArgs: -G "Xcode", destDir: osx, buildType: Release} - - {name: apple-ios, os: macos-latest, cmakeArgs: -DCMAKE_SYSTEM_NAME=iOS -G "Xcode", buildType: Release} + - {name: apple-ios, os: macos-latest, cmakeArgs: -DCMAKE_SYSTEM_NAME=iOS -G "Xcode", destDir: ios, buildType: Release} - {name: x86_64-pc-linux-gnu, os: ubuntu-latest, buildType: Release} - {name: x86_64-pc-windows-msvc, os: windows-latest, cmakeArgs: -DCMAKE_SYSTEM_VERSION="10.0.18362.0" -G "Visual Studio 16 2019" -A x64, buildType: Release} - {name: x86_64-w64-mingw32, os: windows-latest, cmakeArgs: -G "MinGW Makefiles", destDir: win, buildType: RelWithDebInfo} diff --git a/.github/workflows/switch.yml b/.github/workflows/switch.yml index 359435686..84ca09995 100644 --- a/.github/workflows/switch.yml +++ b/.github/workflows/switch.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: config: - - {name: standalone} + - {name: standalone, destDir: switch} - {name: libretro, cmakeArgs: -DLIBRETRO=ON} steps: @@ -30,4 +30,21 @@ jobs: name: flycast-switch-${{ matrix.config.name }} path: build/artifact - \ No newline at end of file + - name: Package app + run: | + cd build/artifact + zip flycast.nro.zip flycast.nro + rm -f flycast.nro + + - name: Configure AWS Credentials + id: aws-credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: AKIAJOZQS4H2PHQWYFCA + aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }} + aws-region: us-east-2 + if: github.repository == 'flyinghead/flycast' && github.event_name == 'push' && matrix.config.destDir != '' + + - name: Upload to S3 + run: aws s3 sync build/artifact s3://flycast-builds/${{ matrix.config.destDir }}/${{ env.GIT_BUILD }} --acl public-read --follow-symlinks + if: ${{ steps.aws-credentials.outputs.aws-account-id != '' }}