Skip to content

fix: show server status again #12

fix: show server status again

fix: show server status again #12

Workflow file for this run

name: Build and Release ODIN CLI Tool
on:
push:
tags:
- "v*.*.*"
jobs:
ensure_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check version match
run: |

Check failure on line 16 in .github/workflows/build-binaries.yml

View workflow run for this annotation

GitHub Actions / Build and Release ODIN CLI Tool

Invalid workflow file

The workflow is not valid. .github/workflows/build-binaries.yml (Line: 16, Col: 14): Unexpected symbol: 'ref_name#v'. Located at position 8 within expression: github.ref_name#v
TAG_VERSION="${{ github.ref_name#v }}"
FILE_VERSION=$(jq -r '.version' src/mod.json)
if [[ "$TAG_VERSION" == "$FILE_VERSION" ]]; then
exit 0
else
echo "Version mismatch: Tag is $TAG_VERSION, but mod.json has $FILE_VERSION"
exit 1
fi
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triplet: x86_64-unknown-linux-gnu
binary: odin-linux
- os: macos-latest
triplet: x86_64-apple-darwin
binary: odin-macos-x86
- os: macos-latest
triplet: aarch64-apple-darwin
binary: odin-macos-arm
- os: windows-latest
triplet: x86_64-pc-windows-msvc
binary: odin-windows.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version-file: .dvmrc
- name: Compile Binary
run: |
deno task build
mv odin${{ matrix.os == 'windows-latest' && '.exe' || '' }} ${{ matrix.binary }}
env:
DENO_BUILD_TARGET: ${{ matrix.triplet }}
- name: Set Exacutable Flag
if: matrix.os != 'windows-latest'
run: chmod +x ${{ matrix.binary }}
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.binary }}
path: ${{ matrix.binary }}
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Binaries
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
./odin-linux
./odin-macos-x86
./odin-macos-arm
./odin-windows.exe
draft: false
prerelease: false
name: Release ${{ github.ref_name }}