diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d600043..e47e03c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: branches: - main pull_request: + workflow_dispatch: jobs: build: @@ -14,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - go-version: ['1.23.0'] # Updated to Go 1.23.0 + go-version: ['1.23.0'] steps: - name: Checkout code @@ -38,19 +39,6 @@ jobs: - name: Install dependencies run: go mod download - - name: Debug Go Environment - run: | - echo "Go Environment Information" - go env - echo "Go Version" - go version - echo "Current Directory" - pwd - echo "Listing Files" - ls -la - echo "Checking go.mod" - cat go.mod - - name: Build for ${{ matrix.os }} run: | echo "Starting build for $RUNNER_OS..." @@ -74,3 +62,46 @@ jobs: run: | echo "Listing contents of builds/ folder" ls -la builds/ + + release: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v1.0.${{ github.run_number }} + release_name: "SkyeCraft Release v1.0.${{ github.run_number }}" + draft: false + prerelease: false + + - name: Upload SkyeCraft-macOS binary + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: builds/SkyeCraft-macOS + asset_name: SkyeCraft-macOS + asset_content_type: application/octet-stream + + - name: Upload SkyeCraft-linux binary + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: builds/SkyeCraft-linux + asset_name: SkyeCraft-linux + asset_content_type: application/octet-stream + + - name: Upload SkyeCraft.exe binary + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: builds/SkyeCraft.exe + asset_name: SkyeCraft.exe + asset_content_type: application/octet-stream