Skip to content

Release

Release #40

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
f3d_version:
description: 'F3D version to build'
required: true
default: 'v2.0.0'
sb_branch:
description: 'Superbuild branch/tag to use'
required: true
default: 'main'
publish_assets:
description: 'Publish assets to a prerelease'
required: true
default: 'false'
jobs:
windows:
strategy:
fail-fast: false
matrix:
raytracing_label: [raytracing, no-raytracing]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
submodules: true
lfs: true
ref: ${{ github.event.inputs.sb_branch}}
- name: Build and package F3D
uses: ./source/.github/actions/f3d-superbuild/
with:
f3d_version: ${{github.event.inputs.f3d_version}}
raytracing_label: ${{matrix.raytracing_label}}
- name: Publish assets
if: ${{ github.event.inputs.publish_assets == 'true' }}
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: ${{github.event.inputs.f3d_version}}
artifacts: './build/F3D-*'
linux:
strategy:
fail-fast: false
matrix:
raytracing_label: [raytracing, no-raytracing]
egl_label: [egl, no-egl]
runs-on: ubuntu-latest
container: ghcr.io/f3d-app/f3d-superbuild-ci
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
submodules: true
lfs: true
ref: ${{ github.event.inputs.sb_branch}}
- name: Build and package F3D
uses: ./source/.github/actions/f3d-superbuild/
with:
f3d_version: ${{github.event.inputs.f3d_version}}
raytracing_label: ${{matrix.raytracing_label}}
egl_label: ${{matrix.egl_label}}
- name: Publish assets
if: ${{ github.event.inputs.publish_assets == 'true' }}
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: ${{github.event.inputs.f3d_version}}
artifacts: './build/F3D-*'
macos:
strategy:
fail-fast: false
matrix:
raytracing_label: [raytracing, no-raytracing]
runs-on: macos-latest
env:
CMAKE_OSX_ARCHITECTURES: x86_64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
submodules: true
lfs: true
ref: ${{ github.event.inputs.sb_branch}}
- name: Build and package F3D
uses: ./source/.github/actions/f3d-superbuild/
with:
f3d_version: ${{github.event.inputs.f3d_version}}
raytracing_label: ${{matrix.raytracing_label}}
- name: Publish assets
if: ${{ github.event.inputs.publish_assets == 'true' }}
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: ${{github.event.inputs.f3d_version}}
artifacts: './build/F3D-*'
macos_arm:
strategy:
fail-fast: false
runs-on: macos-14
env:
CMAKE_OSX_ARCHITECTURES: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
submodules: true
lfs: true
ref: ${{ github.event.inputs.sb_branch}}
- name: Build and package F3D
uses: ./source/.github/actions/f3d-superbuild/
with:
f3d_version: ${{github.event.inputs.f3d_version}}
- name: Publish assets
if: ${{ github.event.inputs.publish_assets == 'true' }}
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: ${{github.event.inputs.f3d_version}}
artifacts: './build/F3D-*'
python_wheels:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
runs-on: ${{matrix.os}}-latest
env:
DISPLAY: :0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'source'
submodules: true
lfs: true
ref: ${{ github.event.inputs.sb_branch}}
- name: Build and package F3D python wheels
uses: ./source/.github/actions/wheels/
with:
f3d_version: ${{github.event.inputs.f3d_version}}
use_cache: false
- name: Publish assets
if: ${{ github.event.inputs.publish_assets == 'true' }}
uses: ncipollo/release-action@v1
with:
owner: f3d-app
repo: f3d
token: ${{ secrets.SECRET_TOKEN }}
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
replacesArtifacts: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
tag: ${{github.event.inputs.f3d_version}}
artifacts: './wheelhouse/f3d-*.whl'
pypi-publish:
needs: python_wheels
strategy:
fail-fast: false
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/f3d
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
path: dist
- name: Publish package distributions to PyPi
uses: pypa/gh-action-pypi-publish@release/v1