Skip to content

Workflow file for this run

on:
release:
types: [created]
jobs:
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/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/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"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/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"
extra_files: "./assets/"
ldflags: "-X 'github.com/BigJk/end_of_eden/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/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/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/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.20'
- name: Build
run: |
go build -ldflags="-X 'github.com/BigJk/end_of_eden/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/git.CommitHash=${{ github.sha }}'" -o end_of_eden ./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.20'
- name: Build
run: |
go build -ldflags="-X 'github.com/BigJk/end_of_eden/git.Tag=${{ github.ref_name }}' -X 'github.com/BigJk/end_of_eden/git.CommitHash=${{ github.sha }}'" -o end_of_eden ./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