From 9907028e1c56eb49969c338f4090241589f6d9b7 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sat, 14 Jun 2025 20:13:47 -0700 Subject: [PATCH] Add release step to CI --- .github/workflows/ci.yml | 98 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a65ae81..0619a521 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,80 @@ jobs: fail-fast: false matrix: include: - - { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, build-type: 'Debug', linux: true, werror: true, clang-tidy: true } - - { name: 'MSVC (x86)', os: 'windows-latest', dx5: true, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' } - - { name: 'MSVC (x64)', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' } - - { name: 'MSVC (arm64)', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' } - - { name: 'msys2 mingw32', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' } - - { name: 'msys2 mingw64', os: 'windows-latest', dx5: false, config: true, build-type: 'Debug', mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' } - - { name: 'macOS', os: 'macos-latest', dx5: false, config: true, build-type: 'Debug', brew: true, werror: true, clang-tidy: false } - - { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, build-type: 'Debug', emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' } + - name: 'Linux' + os: 'ubuntu-latest' + dx5: false + config: true + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + linux: true + werror: true + clang-tidy: true + - name: 'MSVC (x86)' + os: 'windows-latest' + dx5: true + config: false + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + msvc: true + werror: false + clang-tidy: false + vc-arch: 'amd64_x86' + - name: 'MSVC (x64)' + os: 'windows-latest' + dx5: false + config: false + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + msvc: true + werror: false + clang-tidy: false + vc-arch: 'amd64' + - name: 'MSVC (arm64)' + os: 'windows-latest' + dx5: false + config: false + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + msvc: true + werror: false + clang-tidy: false + vc-arch: 'amd64_arm64' + - name: 'msys2 mingw32' + os: 'windows-latest' + dx5: false + config: false + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + mingw: true + werror: true + clang-tidy: true + msystem: 'mingw32' + msys-env: 'mingw-w64-i686' + shell: 'msys2 {0}' + - name: 'msys2 mingw64' + os: 'windows-latest' + dx5: false + config: true + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + mingw: true + werror: true + clang-tidy: true + msystem: 'mingw64' + msys-env: 'mingw-w64-x86_64' + shell: 'msys2 {0}' + - name: 'macOS' + os: 'macos-latest' + dx5: false + config: true + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + brew: true + werror: true + clang-tidy: false + - name: 'Emscripten' + os: 'ubuntu-latest' + dx5: false + config: false + build-type: ${{ github.ref == 'refs/heads/master' && 'Release' || 'Debug' }} + emsdk: true + werror: true + clang-tidy: false + cmake-wrapper: 'emcmake' steps: - name: Setup vcvars if: ${{ !!matrix.msvc }} @@ -109,6 +175,22 @@ jobs: name: '${{ matrix.name }} ${{ matrix.build-type }}' path: build/dist/isle-* + - name: Checkout uploadtool + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle-portable' }} + uses: actions/checkout@v4 + with: + repository: 'probonopd/uploadtool' + path: 'uploadtool' + + - name: Upload Continuous Release + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle-portable' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }} + run: | + export UPLOADTOOL_SUFFIX="${{ matrix.name }}" + ./uploadtool/upload.sh build/dist/isle-* + ncc: name: 'C++' runs-on: ubuntu-latest