I can’t figure out how to make Travis-CI upload multiple builds to one release on GitHub

Umm, hi, I’m using Travis-CI for my project, and I want to try and use it to build my cpp files for multiple OS (in this case, Windows and Linux), at first I created 2 separate build jobs, which worked fine, except the fact that it create 2 Releases, one for Linux and one for Windows, but I want to merge them into one release, with both binaries included, so I tried to edit the .travis.yml file to be this:
language: cpp
compiler:
- gcc

jobs:
  include:
  - stage: build
    os: linux
    script:
      - g++ main.cpp -std=c++17 -o main

  - stage: build        
    os: windows
    script:
      - g++ main.cpp -std=c++17 -o main
  - stage: GitHub Release
    deploy:
    provider: releases
    api_key: $GithubKey
    file:
    - "main.exe"
    - "main"
    skip_cleanup: true

But it doesn’t work, it create 3 jobs as expected, but the third one (aka the Release stage) fails, I looked at the log and see that it tried to rebuild the project (which wouldn’t work because it is using C script) and no file were ever uploaded, can someone guide me on how to make it so that when it finish building the 2 files in different OSs, it send them all up to one release on GitHub? Thanks in advance

Imprint