Skip to content

chore: further simplify workflow #5

chore: further simplify workflow

chore: further simplify workflow #5

Workflow file for this run

name: Build and Release ODIN CLI Tool
on:
push:
tags:
- "v*.*.*"
jobs:
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: 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 }}