Create release #261
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
create: | |
ref_type: tag | |
ref: 'v*' | |
name: Create release | |
jobs: | |
build-release-artifacts: | |
name: Build artifact | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- artifact: windows-x86_64 | |
os: windows-latest | |
toolchain: 1.79.0-x86_64-pc-windows-msvc | |
lib-file-name: helgobox.dll | |
extension-file-name: reaper_helgobox.dll | |
target: x86_64-pc-windows-msvc | |
use-cross: false | |
profile: release | |
features: "playtime,egui,licensing" | |
macosx_deployment_target: "" | |
- artifact: windows-i686 | |
os: windows-latest | |
toolchain: 1.81.0-i686-pc-windows-msvc | |
lib-file-name: helgobox.dll | |
extension-file-name: reaper_helgobox.dll | |
target: i686-pc-windows-msvc | |
use-cross: false | |
profile: release-llvm-out-of-memory-fix | |
features: "egui" | |
macosx_deployment_target: "" | |
- artifact: macos-x86_64 | |
os: macos-latest | |
toolchain: 1.81.0-x86_64-apple-darwin | |
lib-file-name: libhelgobox.dylib | |
extension-file-name: libreaper_helgobox.dylib | |
target: x86_64-apple-darwin | |
use-cross: false | |
profile: release-strip | |
features: "playtime,egui,licensing" | |
# The minimum version that I tested with is 10.13. | |
# Writing 10.7 builds, but it won't run, for example, on 10.14 (weird)! | |
# https://github.com/helgoboss/helgobox/issues/1384 | |
macosx_deployment_target: "10.9" | |
- artifact: macos-aarch64 | |
os: macos-latest | |
toolchain: 1.81.0-x86_64-apple-darwin | |
lib-file-name: libhelgobox.dylib | |
extension-file-name: libreaper_helgobox.dylib | |
target: aarch64-apple-darwin | |
use-cross: false | |
profile: release-strip | |
features: "playtime,egui,licensing" | |
# First aarch64 macOS version | |
macosx_deployment_target: "11.0" | |
- artifact: linux-x86_64 | |
os: ubuntu-20.04 | |
toolchain: 1.81.0-x86_64-unknown-linux-gnu | |
lib-file-name: libhelgobox.so | |
extension-file-name: libreaper_helgobox.so | |
target: x86_64-unknown-linux-gnu | |
use-cross: false | |
profile: release-strip | |
features: "playtime,licensing" | |
macosx_deployment_target: "" | |
- artifact: linux-aarch64 | |
os: ubuntu-22.04-arm | |
toolchain: 1.81.0-aarch64-unknown-linux-gnu | |
lib-file-name: libhelgobox.so | |
extension-file-name: libreaper_helgobox.so | |
target: aarch64-unknown-linux-gnu | |
profile: release-strip | |
features: "playtime,licensing" | |
macosx_deployment_target: "" | |
# - artifact: linux-armv7 | |
# os: ubuntu-22.04 | |
# toolchain: 1.81.0-x86_64-unknown-linux-gnu | |
# lib-file-name: libhelgobox.so | |
# extension-file-name: "" | |
# target: armv7-unknown-linux-gnueabihf | |
# use-cross: true | |
# profile: release-strip | |
# features: "" | |
# macosx_deployment_target: "" | |
env: | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} | |
steps: | |
# Prepare (all) | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: webfactory/ssh-agent@v0.7.0 | |
with: | |
ssh-private-key: | | |
${{ secrets.PRIVATE_PLAYTIME_CLIP_ENGINE_DEPLOY_KEY }} | |
${{ secrets.PRIVATE_HELGOBOSS_LICENSE_PROCESSOR_DEPLOY_KEY }} | |
- name: Update submodules | |
run: | | |
git submodule update --init | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
target: ${{ matrix.target }} | |
override: true | |
# Install OS dependencies (Linux/macOS only) | |
- name: Install native Linux dependencies | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
sudo apt-get update | |
sudo apt-get install nasm php binutils-arm-linux-gnueabihf binutils-aarch64-linux-gnu libudev-dev libxdo-dev libx11-dev libxcursor-dev libxcb-dri2-0-dev libxcb-icccm4-dev libx11-xcb-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libspeechd-dev libgtk-3-dev | |
- run: brew install php | |
if: matrix.os == 'macos-latest' | |
# Generate dialogs outside of Docker containers in cross builds because PHP is not available in container. | |
# TODO-high-performance Update: Actually, now it is ... I added it to Cross.toml. So I guess we can remove this. | |
- name: cargo test (for generating dialogs with php) | |
if: matrix.use-cross == true | |
uses: actions-rs/cargo@v1 | |
env: | |
RUST_MIN_STACK: 5242880 | |
with: | |
command: test | |
args: --features "${{ matrix.features }}" | |
# Build (all) | |
- name: Build release | |
uses: actions-rs/cargo@v1 | |
env: | |
PLAYTIME_AUTHENTICITY_SIGNING_KEY: "${{ secrets.PLAYTIME_AUTHENTICITY_SIGNING_KEY }}" | |
PLAYTIME_LICENSE_VERIFYING_KEY: "${{ secrets.PLAYTIME_LICENSE_VERIFYING_KEY }}" | |
PLAYTIME_PRESET_VERIFYING_KEY: "${{ secrets.PLAYTIME_PRESET_VERIFYING_KEY }}" | |
AWS_LC_SYS_CMAKE_BUILDER: "1" | |
with: | |
command: build | |
args: --features "${{ matrix.features }}" --profile ${{ matrix.profile }} --target ${{ matrix.target }} | |
use-cross: ${{ matrix.use-cross }} | |
# Upload to artifact | |
- name: Upload plug-in and extension to artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.artifact }} | |
path: | | |
target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.lib-file-name }} | |
target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.extension-file-name }} | |
target/${{ matrix.target }}/${{ matrix.profile }}/helgobox.pdb | |
target/${{ matrix.target }}/${{ matrix.profile }}/deps/libhelgobox.dylib.dSYM/ | |
target/${{ matrix.target }}/${{ matrix.profile }}/libhelgobox-debug.so | |
# Windows x64: Upload PDB to Sentry | |
- name: Upload PDB | |
if: startsWith(matrix.artifact, 'windows-x86_64') | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
run: | | |
# Install Sentry CLI | |
npm install -g @sentry/cli | |
# Upload | |
sentry-cli debug-files upload --auth-token $SENTRY_AUTH_TOKEN -o $SENTRY_ORG -p $SENTRY_PROJECT "target/${{ matrix.target }}/${{ matrix.profile }}/helgobox.pdb" | |
create-release: | |
name: Publish release | |
needs: build-release-artifacts | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Get tag name | |
id: get_tag_name | |
run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//} | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ steps.get_tag_name.outputs.TAG_NAME }} | |
release_name: ${{ steps.get_tag_name.outputs.TAG_NAME }} | |
draft: true | |
prerelease: ${{ contains(github.ref, 'pre') }} | |
- name: Download artifacts from build job | |
uses: actions/download-artifact@v4 | |
# Upload Windows x86_64 artifacts | |
- name: Upload windows-x86_64 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./windows-x86_64/helgobox.dll | |
asset_name: helgobox-windows-x86_64.dll | |
asset_content_type: application/octet-stream | |
- name: Upload windows-x86_64 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./windows-x86_64/reaper_helgobox.dll | |
asset_name: reaper_helgobox-windows-x86_64.dll | |
asset_content_type: application/octet-stream | |
# Upload Windows i686 artifacts | |
- name: Upload windows-i686 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./windows-i686/helgobox.dll | |
asset_name: helgobox-windows-i686.dll | |
asset_content_type: application/octet-stream | |
- name: Upload windows-i686 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./windows-i686/reaper_helgobox.dll | |
asset_name: reaper_helgobox-windows-i686.dll | |
asset_content_type: application/octet-stream | |
# Upload macOS x86_64 artifacts | |
- name: Upload macos-x86_64 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./macos-x86_64/libhelgobox.dylib | |
asset_name: helgobox-macos-x86_64.vst.dylib | |
asset_content_type: application/octet-stream | |
- name: Upload macos-x86_64 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./macos-x86_64/libreaper_helgobox.dylib | |
asset_name: reaper_helgobox-macos-x86_64.dylib | |
asset_content_type: application/octet-stream | |
# Upload macOS aarch64 artifacts | |
- name: Upload macos-aarch64 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./macos-aarch64/libhelgobox.dylib | |
asset_name: helgobox-macos-aarch64.vst.dylib | |
asset_content_type: application/octet-stream | |
- name: Upload macos-aarch64 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./macos-aarch64/libreaper_helgobox.dylib | |
asset_name: reaper_helgobox-macos-aarch64.dylib | |
asset_content_type: application/octet-stream | |
# Upload Linux x86_64 artifacts | |
- name: Upload linux-x86_64 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./linux-x86_64/libhelgobox.so | |
asset_name: helgobox-linux-x86_64.so | |
asset_content_type: application/octet-stream | |
- name: Upload linux-x86_64 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./linux-x86_64/libreaper_helgobox.so | |
asset_name: reaper_helgobox-linux-x86_64.dll | |
asset_content_type: application/octet-stream | |
# Upload Linux aarch64 artifacts | |
- name: Upload linux-aarch64 release artifact 1 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./linux-aarch64/libhelgobox.so | |
asset_name: helgobox-linux-aarch64.so | |
asset_content_type: application/octet-stream | |
- name: Upload linux-aarch64 release artifact 2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./linux-aarch64/libreaper_helgobox.so | |
asset_name: reaper_helgobox-linux-aarch64.so | |
asset_content_type: application/octet-stream | |
# Upload Linux armv7 artifacts | |
# - name: Upload linux-armv7 release artifact | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./linux-armv7/libhelgobox.so | |
# asset_name: helgobox-linux-armv7.so | |
# asset_content_type: application/octet-stream | |
create-sentry-release: | |
name: Create Sentry release | |
needs: create-release | |
runs-on: ubuntu-22.04 | |
continue-on-error: true | |
steps: | |
# Checkout (necessary for Sentry to get info) | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Create Sentry release (optional) | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
version: ${GITHUB_REF#refs/tags/v} |