fix: wasm_exec.js #54
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
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
release-wasm: | ||
permissions: write-all | ||
name: release js/wasm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
goversion: "1.21.6" | ||
md5sum: FALSE | ||
compress_assets: "zip" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev && ./internal/misc/build_index.sh ./assets && cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./game_wasm/wasm_exec.js" | ||
project_path: "./cmd/game_wasm" | ||
binary_name: "eoe.wasm" | ||
extra_files: "./assets/ ./cmd/game_wasm/index.html ./cmd/game_wasm/wasm_exec.js" | ||
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" | ||
goos: js | ||
goarch: wasm | ||
release-linux-term-amd64: | ||
permissions: write-all | ||
name: release linux/amd64 term | ||
runs-on: ubuntu-latest | ||
env: | ||
CGO_ENABLED: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
md5sum: FALSE | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev" | ||
project_path: "./cmd/game" | ||
binary_name: "end_of_eden_term" | ||
extra_files: "./assets/" | ||
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" | ||
goos: linux | ||
goarch: amd64 | ||
release-linux-gl-amd64: | ||
permissions: write-all | ||
name: release linux/amd64 gl | ||
runs-on: ubuntu-latest | ||
env: | ||
CGO_ENABLED: 1 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
md5sum: FALSE | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pre_command: "apt-get update && apt-get install --no-install-recommends -y pkg-config libasound2-dev libx11-dev gcc libc6-dev libglu1-mesa-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev" | ||
project_path: "./cmd/game_win" | ||
binary_name: "end_of_eden_gl" | ||
build_flags: "-tags ebitenginesinglethread" | ||
extra_files: "./assets/" | ||
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" | ||
goos: linux | ||
goarch: amd64 | ||
release-windows-term-amd64: | ||
permissions: write-all | ||
name: release windows/amd64 term | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
md5sum: FALSE | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
project_path: "./cmd/game" | ||
binary_name: "end_of_eden_term" | ||
build_flags: "-tags ebitenginesinglethread" | ||
extra_files: "./assets/" | ||
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" | ||
goos: windows | ||
goarch: amd64 | ||
release-windows-gl-amd64: | ||
permissions: write-all | ||
name: release windows/amd64 gl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
md5sum: FALSE | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
project_path: "./cmd/game_win" | ||
binary_name: "end_of_eden_gl" | ||
extra_files: "./assets/" | ||
ldflags: "-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" | ||
goos: windows | ||
goarch: amd64 | ||
release-macos-term-amd64: | ||
permissions: write-all | ||
name: release macos/amd64 term | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.21' | ||
- name: Build | ||
run: | | ||
go build -ldflags="-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" -o end_of_eden -tags ebitenginesinglethread ./cmd/game | ||
export BIN=end_of_eden_term-$(basename ${GITHUB_REF})-macos-amd64 | ||
mkdir $BIN | ||
cp ./end_of_eden $BIN/end_of_eden | ||
cp -r ./assets $BIN/assets/ | ||
zip -r $BIN.zip $BIN | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: end_of_eden_term-${{ github.ref_name }}-macos-amd64.zip | ||
release-macos-gl-amd64: | ||
permissions: write-all | ||
name: release macos/amd64 gl | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Fetch XCode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest-stable | ||
- name: Fetch Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.21' | ||
- name: Build | ||
run: | | ||
go build -ldflags="-X 'github.com/BigJk/end_of_eden/internal/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/internal/git.CommitHash=${{ github.sha }}'" -o end_of_eden -tags ebitenginesinglethread ./cmd/game_win | ||
export BIN=end_of_eden_gl-$(basename ${GITHUB_REF})-macos-amd64 | ||
mkdir $BIN | ||
cp ./end_of_eden $BIN/end_of_eden | ||
cp -r ./assets $BIN/assets/ | ||
zip -r $BIN.zip $BIN | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: end_of_eden_gl-${{ github.ref_name }}-macos-amd64.zip |