Skip to content

Generate Release

Generate Release #8

Workflow file for this run

name: Generate Release
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to create for the release'
required: true
jobs:
release:
permissions:
contents: write
# Build the master & 0.6.x branches
strategy:
matrix:
include:
- { branch: master, runtime: 5.0.x, otd_version: 0.5.x }
- { branch: 0.6.x, runtime: 6.0.x, otd_version: 0.6.x }
runs-on: ubuntu-latest
name: Generate Release
env:
TAG: ${{ github.event.inputs.tag }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.runtime }}
- name: Build
run: bash ./build.sh
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OTD_VERSION: ${{ matrix.otd_version }}
BRANCH: ${{ matrix.branch }}
run: |
declare -a files
# if OTD_VERSION is not 0.5.x, add "-OTD_VERSION" to the tag
if [ "$OTD_VERSION" != "0.5.x" ]; then
output_tag="$TAG-$OTD_VERSION"
else
output_tag="$TAG"
fi
# Add Installers
files+=("build/OTD.EnhancedOutputMode-$OTD_VERSION.zip")
gh release create -d -t "Enhanced Output Mode $TAG for $OTD_VERSION" "$output_tag" "${files[@]}" -F build/hashes.txt --target $BRANCH