implement difficulty selection in worst way possible #73
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
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.20' | |
- name: Build Windows exe | |
env: | |
GPT_KEY: ${{ secrets.GPT_KEY }} | |
shell: bash | |
run: go build -ldflags "-X ebijam23/resources.gptKey=$GPT_KEY" -o retromancer.exe | |
- name: Upload Windows exe | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retromancer-win | |
path: | | |
LICENSE | |
retromancer.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.20' | |
- name: Build Mac exe | |
shell: bash | |
env: | |
GPT_KEY: ${{ secrets.GPT_KEY }} | |
run: go build -ldflags "-X ebijam23/resources.gptKey=$GPT_KEY" -o retromancer | |
- name: Tar it up | |
shell: bash | |
run: tar -zcvf retromancer-mac.tar.gz retromancer LICENSE | |
- name: Upload Mac exe | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retromancer-mac | |
path: retromancer-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.20' | |
- 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 | |
shell: bash | |
env: | |
GPT_KEY: ${{ secrets.GPT_KEY }} | |
run: go build -ldflags "-X ebijam23/resources.gptKey=$GPT_KEY" -v -o retromancer | |
- name: Tar it up | |
shell: bash | |
run: tar -zcvf retromancer-lin.tar.gz retromancer LICENSE | |
- name: Upload Linux exe | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retromancer-lin | |
path: retromancer-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.20' | |
- name: Build Web binary | |
shell: bash | |
env: | |
GPT_KEY: ${{ secrets.GPT_KEY }} | |
run: GOOS=js GOARCH=wasm go build -v -ldflags "-X ebijam23/resources.gptKey=$GPT_KEY -w -s" -o dist/web/retromancer.wasm | |
- name: Copy WASM exec script | |
shell: bash | |
run: cp $(go env GOROOT)/misc/wasm/wasm_exec.js dist/web/. | |
- name: Upload Web build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retromancer-web | |
path: | | |
dist/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: retromancer-win | |
- name: Download Linux binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: retromancer-lin | |
- name: Download Mac binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: retromancer-mac | |
- name: Upload beta testing bundle | |
uses: actions/upload-artifact@v3 | |
with: | |
name: retromancer-bundle | |
path: | | |
README.md | |
LICENSE | |
retromancer-lin.tar.gz | |
retromancer-mac.tar.gz | |
retromancer.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: retromancer-win | |
- uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: windows | |
ITCH_GAME: retromancer | |
ITCH_USER: kettek | |
PACKAGE: retromancer.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: retromancer-mac | |
- name: Extract tarball | |
shell: bash | |
run: tar -zxvf retromancer-mac.tar.gz | |
- uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: mac | |
ITCH_GAME: retromancer | |
ITCH_USER: kettek | |
PACKAGE: retromancer | |
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: retromancer-lin | |
- name: Extract tarball | |
shell: bash | |
run: tar -zxvf retromancer-lin.tar.gz | |
- uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: linux | |
ITCH_GAME: retromancer | |
ITCH_USER: kettek | |
PACKAGE: retromancer | |
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: retromancer-web | |
- uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: web | |
ITCH_GAME: retromancer | |
ITCH_USER: kettek | |
PACKAGE: dist/web | |
VERSION: ${{github.ref_name}} | |