Skip to content

3. Generate Release #35

3. Generate Release

3. Generate Release #35

name: 3. Generate Release
on:
workflow_dispatch:
jobs:
generate_release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Determine Version Number
id: determine_version_number
run: echo "VERSION_NUMBER=$($env:GITHUB_REF_NAME.Replace('release/v', ''))" >> $env:GITHUB_OUTPUT
- name: Determine Version Notes
id: determine_release_notes
run: |
echo "VERSION_NOTES<<EOF" >> $env:GITHUB_OUTPUT
echo $((Get-Content -Raw WireGuardServerForWindows\VersionInfo2.xml | Select-String "(?s)<VersionNotes>(.*)<\/VersionNotes>").Matches.Groups[1].Value) >> $env:GITHUB_OUTPUT
echo "EOF" >> $env:GITHUB_OUTPUT
- name: Setup MSBuild
uses: microsoft/setup-msbuild@main
- name: Download .NET Core Runtime
run: Invoke-WebRequest https://download.visualstudio.microsoft.com/download/pr/3f56df9d-6dc0-4897-a49b-ea891f9ad0f4/076e353a29908c70e24ba8b8d0daefb8/windowsdesktop-runtime-3.1.21-win-x64.exe -OutFile Installer\windowsdesktop-runtime-3.1.21-win-x64.exe
- name: Generate Release
run: Installer\GenerateRelease.ps1
- name: Publish Release
uses: softprops/action-gh-release@master
with:
files: Installer/WS4WSetup-${{ steps.determine_version_number.outputs.VERSION_NUMBER }}.exe
fail_on_unmatched_files: true
tag_name: v${{ steps.determine_version_number.outputs.VERSION_NUMBER }}
body: ${{ steps.determine_release_notes.outputs.VERSION_NOTES }}
draft: true