Skip to content

v1.6.1

v1.6.1 #29

Workflow file for this run

# This is a basic workflow to help you get started with Action
name: CI
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
name: Release
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
- kind: windows
os: windows-latest
target: win-x64
- kind: macOS
os: macos-latest
target: osx-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
git tag --list
git describe --tags --abbrev=0
- 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="LAPS-WebUI-$tag-${{ matrix.target }}"
# Build everything
dotnet publish src/LAPS-WebUI.csproj --self-contained --framework net8.0 --runtime "${{ matrix.target }}" -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Publish
uses: softprops/action-gh-release@v2
with:
files: "LAPS-WebUI*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}