Skip to content

Commit

Permalink
builds to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Skye committed Sep 27, 2024
1 parent 54b45f2 commit 7b1c83e
Showing 1 changed file with 45 additions and 14 deletions.
59 changes: 45 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
Expand All @@ -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
Expand All @@ -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..."
Expand All @@ -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

0 comments on commit 7b1c83e

Please sign in to comment.