Skip to content

Release desktop binaries #9

Release desktop binaries

Release desktop binaries #9

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
artifact-name: dmt-${{ inputs.release-tag }}-win-x64.zip
- platform: windows
platform-short: win
runtime: win-arm64
artifact-name: dmt-${{ inputs.release-tag }}-win-arm64.zip
- platform: mac
platform-short: mac
runtime: osx-x64
artifact-name: dmt-${{ inputs.release-tag }}-macOS-x64.zip
- platform: mac
platform-short: mac
runtime: osx-arm64
artifact-name: dmt-${{ inputs.release-tag }}-macOS-arm64.zip
- platform: linux
platform-short: linux
runtime: linux-x64
artifact-name: dmt-${{ inputs.release-tag }}-linux-x64.tar.gz
- platform: linux
platform-short: linux
runtime: linux-arm64
artifact-name: dmt-${{ inputs.release-tag }}-linux-arm64.tar.gz
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 }}
- name: Package output files
run: |
# for linux, use tar to create a compressed archive
# for macOS and Windows, use zip to create a compressed archive
if [ "${{ matrix.platform }}" == "linux" ]; then
tar -czvf ${{ matrix.artifact-name }} -C ${{ matrix.runtime }}/ .
else
zip -r ${{ matrix.artifact-name }} ${{ matrix.runtime }}/*
fi
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.runtime }}-package
path: |
${{ matrix.artifact-name }}
create-release:
name: Create GitHub release
runs-on: ubuntu-latest
needs: build-package
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: .
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.release-tag }}
files: |
dmt-${{ inputs.release-tag }}-win-x64.zip
dmt-${{ inputs.release-tag }}-win-arm64.zip
dmt-${{ inputs.release-tag }}-macOS-x64.zip
dmt-${{ inputs.release-tag }}-macOS-arm64.zip
dmt-${{ inputs.release-tag }}-linux-x64.tar.gz
dmt-${{ inputs.release-tag }}-linux-arm64.tar.gz