diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f94a3f9..2c5125b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,44 +1,31 @@ -name: Build and Release +name: Build Extreme Math for Windows on: push: - tags: - - 'v*.*.*' # Trigger the workflow only on tag pushes, e.g., v1.0.0 + branches: + - main + pull_request: + branches: + - main jobs: build: - runs-on: ubuntu-latest # Use Ubuntu for the build environment + runs-on: windows-latest + steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up C++ environment - uses: actions/setup-cpp@v3 - with: - cpp-version: '11' # Set the desired C++ version - - - name: Install dependencies - run: sudo apt-get install -y build-essential # Install necessary build tools - - - name: Build project - run: make # Compile the project using the Makefile - - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} # Use the tag name for the release - release_name: 'Release ${{ github.ref }}' - draft: false - prerelease: false - - - name: Upload release asset - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./build/extreme_math # Path to the built executable - asset_name: extreme_math.exe - asset_content_type: application/octet-stream + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up MinGW for Windows + run: | + choco install mingw + - name: Compile with g++ + run: | + g++ -o extreme_math.exe src/*.cpp + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: extreme-math-windows + path: | + extreme_math.exe