name: Windows_x64 on: push: branches: - master pull_request: types: [ opened, synchronize ] jobs: build: runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - name: Create Build Environment run: > sudo apt-get update && sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 pkg-config-mingw-w64-x86-64 libz-mingw-w64-dev gettext dpkg-dev wget git sudo smpq && sudo rm /usr/x86_64-w64-mingw32/lib/libz.dll.a && sudo Packaging/windows/mingw-prep64.sh - name: Configure CMake shell: bash working-directory: ${{github.workspace}} run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc64.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF -DDEVILUTIONX_STATIC_LIBSODIUM=ON -DDISCORD_INTEGRATION=ON - name: Build working-directory: ${{github.workspace}} shell: bash run: cmake --build build -j $(nproc) --target package - name: Upload-Package if: ${{ !env.ACT }} uses: actions/upload-artifact@v2 with: name: devilutionx_x64.zip path: build/devilutionx.zip - name: Upload artifacts as release in storage repo if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }} uses: svenstaro/upload-release-action@v2 with: repo_name: artifacts-storage/devilutionx-artifacts repo_token: ${{ secrets.ARTIFACTS_STORAGE_TOKEN }} file: build/devilutionx.zip asset_name: artifacts.zip tag: "WIN64-${{ github.sha }}" overwrite: true body: ${{ github.event.head_commit.message }}