Skip to content

Move towards setting up artifacts. #9

Move towards setting up artifacts.

Move towards setting up artifacts. #9

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
tags: [v*]
permissions:
attestations: write
contents: write
id-token: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set architecture
run: |
if [ "${{ matrix.os }}" = 'ubuntu-24.04' ]; then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [ "${{ matrix.os }}" = 'ubuntu-24.04-arm' ]; then
echo "ARCH=arm64" >> $GITHUB_ENV
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
target: export
platforms: linux/${{ env.ARCH }}
outputs: type=local,dest=./output
- name: Copy files
run: |
mkdir -p artifacts
version="$(cat quantlib-version)"
cp "output/build/quantlib-$version.jar" "artifacts/${{ env.ARCH }}-quantlib-$version.jar"
cp "output/build/quantlib-$version.pom" "artifacts/${{ env.ARCH }}-quantlib-$version.pom"
- name: List files
run: find ./artifacts -type f
# TODO - draft release
# - name: Draft release
# if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
# with:
# draft: true
# files: output/build/*
# fail_on_unmatched_files: true