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: Publish Standalone | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
# Disable the .NET logo in the console output. | |
DOTNET_NOLOGO: true | |
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build. | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
# Disable sending .NET CLI telemetry to Microsoft. | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
create-release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
outputs: | |
release_id: ${{ steps.create_release.outputs.id }} | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: true | |
publish-native: | |
strategy: | |
matrix: | |
data: [ | |
{ rid: 'win-x64', os: 'windows-latest' }, | |
{ rid: 'win-x86', os: 'windows-latest' }, | |
{ rid: 'linux-x64', os: 'ubuntu-latest' }, | |
{ rid: 'osx-x64', os: 'macos-13' }, | |
{ rid: 'osx-arm64', os: 'macos-latest' } | |
] | |
name: Publish Native ${{ matrix.data.rid }} | |
runs-on: ${{ matrix.data.os }} | |
needs: create-release | |
steps: | |
- name: Setup | |
uses: butr/actions-common-setup@v2 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
- name: Setup .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.x.x | |
- name: Run _build | |
run: >- | |
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./imgui"; | |
Compress-Archive -Path imgui/* -Destination "imgui-native-${{ matrix.data.rid }}.zip" | |
dotnet publish src/BUTR.CrashReport.Renderer.Html.Standalone/BUTR.CrashReport.Renderer.Html.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./html"; | |
Compress-Archive -Path html/* -Destination "html-native-${{ matrix.data.rid }}.zip" | |
shell: pwsh | |
- name: Upload Release Assets (ImGui) | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
assets_path: "imgui-native-${{ matrix.data.rid }}.zip" | |
- name: Upload Release Assets (Html) | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
assets_path: "html-native-${{ matrix.data.rid }}.zip" | |
publish-universal: | |
strategy: | |
matrix: | |
data: [ | |
{ rid: 'win', os: 'windows-latest' }, | |
{ rid: 'linux', os: 'ubuntu-latest' }, | |
{ rid: 'osx', os: 'macos-latest' } | |
] | |
name: Publish Universal ${{ matrix.data.rid }} | |
runs-on: ${{ matrix.data.os }} | |
needs: create-release | |
steps: | |
- name: Setup | |
uses: butr/actions-common-setup@v2 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
- name: Setup .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.x.x | |
- name: Run _build | |
run: >- | |
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./imgui"; | |
Compress-Archive -Path pub/* -Destination "imgui-net6-${{ matrix.data.rid }}.zip" | |
dotnet publish src/BUTR.CrashReport.Renderer.Html.Standalone/BUTR.CrashReport.Renderer.Html.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./html"; | |
Compress-Archive -Path pub/* -Destination "html-net6-${{ matrix.data.rid }}.zip" | |
shell: pwsh | |
- name: Upload Release Assets (ImGui) | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
assets_path: "imgui-net6-${{ matrix.data.rid }}.zip" | |
- name: Upload Release Assets (Html) | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.create-release.outputs.release_id }} | |
assets_path: "html-net6-${{ matrix.data.rid }}.zip" |