Skip to content

Release desktop binaries #1

Release desktop binaries

Release desktop binaries #1

Workflow file for this run

name: Release desktop binaries
on:
workflow_dispatch:
inputs:
release-tag:
description: 'Version number to build and release'
required: true
jobs:
build-package:
name: Build self-contained executables
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:8.0
strategy:
matrix:
include:
- platform: windows
platform-short: win
runtime: win-x64
- platform: windows
platform-short: win
runtime: win-arm64
- platform: mac
platform-short: mac
runtime: osx-x64
- platform: mac
platform-short: mac
runtime: osx-arm64
- platform: linux
platform-short: linux
runtime: linux-x64
- platform: linux
platform-short: linux
runtime: linux-arm64
steps:
- name: Check .NET version
run: dotnet --version
- name: Checkout source code
uses: actions/checkout@v3
- name: Execute Action build-with-plugins
uses: ./.github/actions/build-with-plugins
with:
platform: ${{ matrix.platform }}
platform-short: ${{ matrix.platform-short }}
runtime: ${{ matrix.runtime }}
build-version: ${{ inputs.release-tag }}
github-release:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build-package
permissions:
contents: write
strategy:
matrix:
include:
- platform: windows
platform-short: win
runtime: win-x64
- platform: windows
platform-short: win
runtime: win-arm64
- platform: mac
platform-short: mac
runtime: osx-x64
- platform: mac
platform-short: mac
runtime: osx-arm64
- platform: linux
platform-short: linux
runtime: linux-x64
- platform: linux
platform-short: linux
runtime: linux-arm64
steps:
- name: Download package
uses: actions/download-artifact@v4
with:
name: ${{ matrix.runtime }}
path: ${{ matrix.runtime }}
- name: Extract Linux package
if: matrix.platform == 'linux'
run: |
tar -xzf dmt-${{ matrix.runtime }}.tar.gz -C ${{ matrix.runtime }} .
- name: Package output files
run: |
zip -r dmt-${{ matrix.runtime }} ${{ matrix.runtime }}/*
- name: Create GitHub release
if: matrix.platform == 'windows'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release-tag }}
files: |
dmt-${{ inputs.release-tag }}-${{ matrix.runtime }}.zip
- name: Create GitHub release
if: matrix.platform == 'mac' && matrix.runtime == 'osx-x64'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release-tag }}
files: |
dmt-${{ inputs.release-tag }}-mac-x64.zip
- name: Create GitHub release
if: matrix.platform == 'mac' && matrix.runtime == 'osx-arm64'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release-tag }}
files: |
dmt-${{ inputs.release-tag }}-mac-arm64.zip
- name: Create GitHub release
if: matrix.platform == 'linux'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release-tag }}
files: |
dmt-${{ inputs.release-tag }}.tar.gz