feat: implement float #20
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 and Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
tags: | |
- "v*.*.*" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go 1.24.0 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.24.0' | |
- name: Run Test | |
run: go test ./... -v | |
- name: Build | |
id: build | |
shell: bash | |
run: | | |
platforms=("linux/amd64" "windows/amd64" "darwin/amd64" "linux/arm64" "windows/arm64" "darwin/arm64" "js/wasm") | |
for platform in "${platforms[@]}"; do | |
IFS="/" read -r -a split <<< "$platform" | |
GOOS=${split[0]} | |
GOARCH=${split[1]} | |
output_name="./bin/antilang-${GOOS}-${GOARCH}" | |
if [ "$GOOS" = "windows" ]; then | |
output_name+=".exe" | |
elif [ "$GOOS" = "js" ]; then | |
output_name+=".wasm" | |
go_file_path="./web/wasm_build.go" | |
else | |
go_file_path="main.go" | |
fi | |
GOOS="$GOOS" GOARCH="$GOARCH" go build -o "$output_name" "$go_file_path" | |
done | |
mv ./bin/antilang-js-wasm.wasm ./web/antilang.wasm | |
- name: Release Tags | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./bin/* | |
- name: Update wasm file | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
commit_message: update wasm file for ${{ github.ref }} | |
files: ./web/antilang.wasm | |
branch: main |