Skip to content

feat: update version to 0.2.0 in moon.mod.json #30

feat: update version to 0.2.0 in moon.mod.json

feat: update version to 0.2.0 in moon.mod.json #30

Workflow file for this run

name: Release Build
permissions:
contents: write
on:
push:
tags:
- "v*"
jobs:
build-macos:
name: Build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@main
with:
version: "0.14.0"
use-cache: false
- name: Setup MoonBit
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: Build pnt Binary
run: |
cd pnt
moon update
moon build --target native
cd ..
- name: Prepare artifacts
run: |
mkdir -p dist
cp zig-out/bin/pnt dist/pnt
- name: Upload artifacts
env:
ARCH: ${{ runner.arch }}
uses: actions/upload-artifact@v4
with:
name: pnt-macos-${{ env.ARCH }}
path: dist/*
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install build-essential
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Setup Zig
uses: mlugg/setup-zig@main
with:
version: "0.14.0"
use-cache: false
- name: Setup MoonBit
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: Build pnt Binary
run: |
cd pnt
moon update
moon build --target native
cd ..
- name: Prepare artifacts
run: |
mkdir -p dist
cp zig-out/bin/pnt dist/pnt
- name: Upload artifacts
env:
ARCH: ${{ runner.arch }}
uses: actions/upload-artifact@v4
with:
name: pnt-linux-${{ env.ARCH }}
path: dist/*
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@main
with:
version: "0.14.0"
use-cache: false
- name: Setup MoonBit
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
echo "$env:USERPROFILE\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Build pnt Binary
run: |
cd pnt
moon update
moon build --target native
cd ..
- name: Prepare artifacts
run: |
mkdir dist
Copy-Item zig-out\bin\pnt.exe dist\pnt.exe
- name: Upload artifacts
env:
ARCH: ${{ runner.arch }}
uses: actions/upload-artifact@v4
with:
name: pnt-windows-${{ env.ARCH }}
path: dist/*
release:
name: Create Release
needs: [build-macos, build-linux]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List downloaded files
run: ls -R artifacts
- name: Zip macOS artifact
run: |
cd artifacts
for d in pnt-macos-*; do
zip -j "${d}.zip" "$d/pnt"
done
- name: Zip linux artifact
run: |
cd artifacts
for d in pnt-linux-*; do
zip -j "${d}.zip" "$d/pnt"
done
# - name: Zip windows artifact
# run: |
# cd artifacts
# for d in pnt-windows-*; do
# zip -j "${d}.zip" "$d/pnt.exe"
# done
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/pnt-macos-*.zip
artifacts/pnt-linux-*.zip
# artifacts/pnt-windows-*.zip