Skip to content

v3.0.0.1

v3.0.0.1 #4

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
release:
name: Release
strategy:
matrix:
kind: ['windows']
include:
- kind: windows
os: windows-latest
target: win-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="ServiceMonitor-$tag-${{ matrix.target }}"
dotnet publish src/ServiceMonitor/ServiceMonitor.csproj --framework net8.0 --runtime "${{ matrix.target }}" --no-self-contained -p:PublishSingleFile=false -c Release -o "$release_name"
if [ "${{ matrix.target }}" == "win-x64" ]; then
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v2
with:
files: "ServiceMonitor-*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}