Release & Publish #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build-and-publish: | |
name: Build and Publish | |
runs-on: windows-2022 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Visual Studio Development Environment | |
uses: compnerd/gha-setup-vsdevenv@main | |
- name: Install Swift | |
uses: compnerd/gha-setup-swift@81f383b35a86e6e966de139be25b451d4f7dd953 # The next main commit breaks our %Path% | |
with: | |
branch: swift-5.10.1-release | |
tag: 5.10.1-RELEASE | |
- name: CMake Configure | |
working-directory: Generator | |
shell: pwsh | |
run: cmake --preset release | |
- name: CMake Build | |
working-directory: Generator | |
shell: pwsh | |
run: cmake --build --preset release | |
- name: Create NuGet Package | |
shell: pwsh | |
run: | | |
$Version = "${{ github.event.release.tag_name }}" | |
if ($Version.StartsWith("v")) $Version = $Version.Substring(1) | |
& Generator\Create-NuGetPackage.ps1 ` | |
-NativeExe "build\release\bin\SwiftWinRT.exe" ` | |
-Version $Version ` | |
-OutputPath "SwiftWinRT.nupkg" | |
- name: Add Release Asset | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: SwiftWinRT.nupkg | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release: ${{ github.event.release.id }} | |
body: SwiftWinRT NuGet package |