Skip to content

update dependencies #12

update dependencies

update dependencies #12

Workflow file for this run

name: on-push
on: [push]
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Install non-go dependencies
run: sudo apt-get update && sudo apt-get install libgl1-mesa-dev xorg-dev libasound2-dev zip
- name: Install butler # used to upload files to itch.io
run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip butler.zip
chmod +x butler
./butler -V
- name: Build linux executable
run: go build -o game .
- name: Build windows executable
env:
GOOS: windows
GOARCH: amd64
run: go build -o game.exe .
- name: Build wasm archive for itch.io
run: ./build_wasm.sh
- name: Release on github
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
game.exe
game
game_wasm.zip
name: ${{ github.ref_name }}
- name: Release on itch.io
if: startsWith(github.ref, 'refs/tags/')
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
./butler push dist remieven/ysgo-sample-cubeandsphere:web --userversion ${{ github.ref_name }} --if-changed
./butler push game remieven/ysgo-sample-cubeandsphere:linux --userversion ${{ github.ref_name }} --if-changed
./butler push game.exe remieven/ysgo-sample-cubeandsphere:windows --userversion ${{ github.ref_name }} --if-changed