diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dec295d..f2f692e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,6 @@ on: jobs: build: - runs-on: windows-latest steps: @@ -25,9 +24,23 @@ jobs: run: | g++ -o extreme_math.exe main.cpp - - name: Upload build artifact - uses: actions/upload-artifact@v3 + - name: Create Release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: Release ${{ env.version }} + tag_name: ${{ github.ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 with: - name: extreme-math-windows - path: | - extreme_math.exe + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./extreme_math.exe + asset_name: extreme_math.exe + asset_content_type: application/octet-stream + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}