Skip to content

Build Binaries

Build Binaries #203

Workflow file for this run

name: Build Binaries
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
architecture: x86_64
- os: macos-13
architecture: x86_64
- os: ubuntu-arm64-4-core
architecture: arm64
- os: macos-latest
architecture: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: tag
run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV
- name: Get artifact name
id: tag

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

View workflow run for this annotation

GitHub Actions / Build Binaries

Invalid workflow file

The workflow is not valid. .github/workflows/build-binaries.yml (Line: 36, Col: 13): The identifier 'tag' may not be used more than once within the same scope.
run: echo "ARTIFACT_NAME=juno-${{ env.TAG }}-${{ runner.os }}-${{ matrix.architecture }}" >> $GITHUB_ENV
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y upx-ucl build-essential cargo git golang libjemalloc-dev libjemalloc2 -y
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install upx cargo-c jemalloc
- name: Set up Go
uses: actions/setup-go@v5.0.2
with:
go-version-file: go.mod
- name: Build Juno
run: |
make juno
upx build/juno
mv build/juno ${{ env.ARTIFACT_NAME }}
- name: Generate Checksum
id: checksum
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
shasum -a 256 ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
else
sha256sum ${{ env.ARTIFACT_NAME }} > ${{ env.ARTIFACT_NAME }}.sha256
fi
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
${{ env.ARTIFACT_NAME }}
${{ env.ARTIFACT_NAME }}.sha256