-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/ketMix/ebijam24
- Loading branch information
Showing
4 changed files
with
880 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
name: Build Executables | ||
on: [push] | ||
jobs: | ||
|
||
build-win: | ||
name: Build Windows binary | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' | ||
- name: Build Windows exe | ||
working-directory: cmd/game | ||
shell: bash | ||
run: go build -o ../../ebijam24.exe | ||
- name: Upload Windows exe | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ebijam24-win | ||
path: | | ||
LICENSE | ||
ebijam24.exe | ||
build-mac: | ||
name: Build MacOS binary | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' | ||
- name: Build Mac exe | ||
working-directory: cmd/game | ||
shell: bash | ||
run: go build -o ../../ebijam24 | ||
- name: Tar it up | ||
shell: bash | ||
run: tar -zcvf ebijam24-mac.tar.gz ebijam24 LICENSE | ||
- name: Upload Mac exe | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ebijam24-mac | ||
path: ebijam24-mac.tar.gz | ||
|
||
build-lin: | ||
name: Build Linux binary | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' | ||
- name: Install dependencies | ||
shell: bash | ||
run: sudo apt-get update && sudo apt-get -y install libgl1-mesa-dev xorg-dev libasound2-dev | ||
- name: Build Linux exe | ||
working-directory: cmd/game | ||
shell: bash | ||
run: go build -o ../../ebijam24 | ||
- name: Tar it up | ||
shell: bash | ||
run: tar -zcvf ebijam24-lin.tar.gz ebijam24 LICENSE | ||
- name: Upload Linux exe | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ebijam24-lin | ||
path: ebijam24-lin.tar.gz | ||
|
||
build-web: | ||
name: Build Web binary | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' | ||
- name: Build Web binary | ||
working-directory: cmd/game | ||
shell: bash | ||
run: GOOS=js GOARCH=wasm go build -o ../../web/ebijam24.wasm | ||
- name: Copy WASM exec script | ||
shell: bash | ||
run: cp $(go env GOROOT)/misc/wasm/wasm_exec.js web/. | ||
- name: Upload Web build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ebijam24-web | ||
path: | | ||
web/ | ||
LICENSE | ||
upload-bundle: | ||
name: Bundle binaries with dev assets | ||
runs-on: ubuntu-latest | ||
needs: [build-lin, build-mac, build-win] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download Windows binary | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-win | ||
- name: Download Linux binary | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-lin | ||
- name: Download Mac binary | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-mac | ||
- name: Upload beta testing bundle | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ebijam24-bundle | ||
path: | | ||
README.md | ||
LICENSE | ||
ebijam24-lin.tar.gz | ||
ebijam24-mac.tar.gz | ||
ebijam24.exe | ||
deploy-win: | ||
name: Deploy Windows build to itch.io | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
needs: build-win | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-win | ||
- uses: josephbmanley/butler-publish-itchio-action@master | ||
env: | ||
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | ||
CHANNEL: windows | ||
ITCH_GAME: ebijam24 | ||
ITCH_USER: kettek | ||
PACKAGE: ebijam24.exe | ||
VERSION: ${{github.ref_name}} | ||
|
||
deploy-mac: | ||
name: Deploy MacOs build to itch.io | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
needs: build-mac | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-mac | ||
- name: Extract tarball | ||
shell: bash | ||
run: tar -zxvf ebijam24-mac.tar.gz | ||
- uses: josephbmanley/butler-publish-itchio-action@master | ||
env: | ||
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | ||
CHANNEL: mac | ||
ITCH_GAME: ebijam24 | ||
ITCH_USER: kettek | ||
PACKAGE: ebijam24 | ||
VERSION: ${{github.ref_name}} | ||
|
||
deploy-lin: | ||
name: Deploy Linux build to itch.io | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
needs: build-lin | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-lin | ||
- name: Extract tarball | ||
shell: bash | ||
run: tar -zxvf ebijam24-lin.tar.gz | ||
- uses: josephbmanley/butler-publish-itchio-action@master | ||
env: | ||
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | ||
CHANNEL: linux | ||
ITCH_GAME: ebijam24 | ||
ITCH_USER: kettek | ||
PACKAGE: ebijam24 | ||
VERSION: ${{github.ref_name}} | ||
|
||
deploy-web: | ||
name: Deploy Web build to itch.io | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
needs: build-web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: ebijam24-web | ||
- uses: josephbmanley/butler-publish-itchio-action@master | ||
env: | ||
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | ||
CHANNEL: web | ||
ITCH_GAME: ebijam24 | ||
ITCH_USER: kettek | ||
PACKAGE: dist/web | ||
VERSION: ${{github.ref_name}} | ||
|
||
|
Oops, something went wrong.