Skip to content

Release-Unpackaged

Release-Unpackaged #29

Workflow file for this run

name: Release-Unpackaged
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
runtime: [win-x86, win-x64, win-arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore RemoteLogViewer/RemoteLogViewer.csproj
- name: Publish
run: dotnet publish RemoteLogViewer/RemoteLogViewer.csproj -c Release-Unpackaged -r ${{ matrix.runtime }} -o publish/
- name: ZIP
run: Compress-Archive -Path publish/* -DestinationPath RemoteLogViewer-${{ github.ref_name }}-${{ matrix.runtime }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: RemoteLogViewer-${{ matrix.runtime }}
path: RemoteLogViewer-${{ github.ref_name }}-${{ matrix.runtime }}.zip
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Generate release notes from CHANGELOG
id: changelog
run: |
TAG=${GITHUB_REF_NAME}
awk "/## ${TAG}/{flag=1;next}/## v/{flag=0}flag" CHANGELOG.md > RELEASE_NOTE.md
if [ ! -s RELEASE_NOTE.md ]; then
echo "No changelog entry found for ${TAG}, using default note."
echo "Release ${TAG}" > RELEASE_NOTE.md
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body_path: RELEASE_NOTE.md
draft: false
prerelease: false
files: ./artifacts/**/*.zip