Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version_suffix:
description: 'The version suffix for this manual build.'
required: false
push:
tags:
- "v*"
jobs:
ubuntu:
runs-on: ubuntu-latest
name: Unix Release (Ubuntu Host)
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Install required packages
run: sudo apt install -y debhelper dotnet-sdk-8.0 build-essential
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
- name: Debian Build
run: ./eng/linux/package.sh --package Debian --output ./dist/debian
- name: Generic Linux Build
run: ./eng/linux/package.sh --package BinaryTarBall --output ./dist/tarball
- name: MacOS Build
run: ./eng/macos/package.sh --package true --output ./dist/macos
- name: Upload all artifacts (Release)
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: |
./dist/debian/*.deb
./dist/tarball/*.tar.gz
./dist/macos/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Debian artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: OpenTabletDriver.deb
path: ./dist/debian/*.deb
- name: Upload generic Linux artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: OpenTabletDriver.linux-x64.tar.gz
path: ./dist/tarball/*.tar.gz
- name: Upload macOS artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: OpenTabletDriver.osx-x64.tar.gz
path: ./dist/macos/*.tar.gz
- name: Publish NuGet package
if: ${{ github.event_name != 'workflow_dispatch' }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_AUTH_TOKEN }}
SOURCE: https://api.nuget.org/v3/index.json
run: |
dotnet pack
dotnet nuget push ./nupkg/*.nupkg -s "$SOURCE" -k "$NUGET_AUTH_TOKEN"
fedora:
runs-on: ubuntu-latest
name: Unix Release (Fedora Host)
container:
image: fedora
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Install required packages
run: sudo dnf install -y rpm-build systemd-rpm-macros libicu openssl-libs zlib krb5-libs git dotnet-sdk-8.0 tree jq
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
# https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory /__w/OpenTabletDriver/OpenTabletDriver
- name: RPM Build
run: ./eng/linux/package.sh --package RedHat --output ./dist/redhat
- name: Upload all artifacts (Release)
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: ./dist/redhat/*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload RPM artifact (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: OpenTabletDriver.rpm
path: ./dist/redhat/*.rpm
windows:
runs-on: windows-latest
name: Windows Release
env:
VERSION_SUFFIX: ${{ github.event.inputs.version_suffix }}
steps:
- name: Checkout OpenTabletDriver Repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: '8.0'
- name: Package
run: ./eng/windows/package.ps1
- name: Upload Windows asset (Release)
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: OpenTabletDriver v${{ github.ref_name }}
draft: true
files: ./dist/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows asset (Dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v4
with:
name: OpenTabletDriver.win-x64.zip
path: ./dist/*.zip