Skip to content

Build Release Assets #14

Build Release Assets

Build Release Assets #14

Workflow file for this run

name: Build Release Assets
on:
workflow_dispatch:
inputs:
upload_tag:
description: 'Optional: Release tag to upload to'
required: false
default: ''
type: string
release:
types: [created]
jobs:
build:
name: Build ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- runner: macos-latest
os: macos
arch: x86_64
- runner: macos-latest
os: macos
arch: aarch64
- runner: ubuntu-latest
os: linux
arch: x86_64
xvfb: true
- runner: ubuntu-24.04-arm
os: linux
arch: aarch64
xvfb: true
- runner: windows-2022
os: windows
arch: x86_64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.11'
- uses: julia-actions/cache@v1
- name: Install dependencies
run: julia --project=meta -e 'using Pkg; Pkg.instantiate()'
- name: Build
env:
MACOS_PFX_PASSWORD: ${{ secrets.MACOS_PFX_PASSWORD }}
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
TARGET_ARCH: ${{ matrix.arch }}
run: |
mkdir -p build
${{ matrix.xvfb && 'xvfb-run -s ''-screen 0 1024x768x24''' || '' }} julia --project=meta meta/build.jl
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: build/*
retention-days: 1
upload:
name: Upload to release
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release' || github.event.inputs.upload_tag != ''
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG_NAME="${{ github.event.inputs.upload_tag || github.event.release.tag_name }}"
echo "Uploading to release: $TAG_NAME"
find artifacts/ -type f | while read -r file; do
echo "Uploading: $file"
gh release upload "$TAG_NAME" "$file"
done
echo "All artifacts uploaded successfully!"