Skip to content

Bump peter-evans/create-pull-request from 6.1.0 to 7.0.2 #92

Bump peter-evans/create-pull-request from 6.1.0 to 7.0.2

Bump peter-evans/create-pull-request from 6.1.0 to 7.0.2 #92

Workflow file for this run

name: Continuous Integration
on: [push, pull_request]
jobs:
build:
name: Build (${{matrix.config}})
runs-on: windows-2022
strategy:
matrix:
config: [Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Fetch nuget packages
run: dotnet restore
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
vs-version: '[17.2,)'
- name: Build
id: build
run: |
msbuild OTDIPC.sln /p:Configuration="${{matrix.config}}"
$out = "${{runner.temp}}/out"
./copy-artifacts.ps1 `
-Configuration ${{matrix.config}} `
-Out $out `
-BuildNumber $Env:GITHUB_RUN_NUMBER
Add-Content $Env:GITHUB_OUTPUT "path=$out"
Add-Content $Env:GITHUB_OUTPUT "version=$(Get-Content $out/version.txt)"
- name: Attach zip
if: matrix.config != 'Debug'
uses: actions/upload-artifact@v4
with:
name: OpenKneeboard-OTD-IPC-v${{steps.build.outputs.version}}
path: ${{steps.build.outputs.path}}/OpenKneeboard-OTD-IPC.zip
- name: Attach test client
if: matrix.config != 'Debug'
uses: actions/upload-artifact@v4
with:
name: OpenKneeboard-OTD-IPC-TestClient-v${{steps.build.outputs.version}}
path: ${{steps.build.outputs.path}}/OTDIPC-TestClient.exe
- name: Attach debug symbols
if: matrix.config != 'Debug'
uses: actions/upload-artifact@v4
with:
name: OpenKneeboard-OTD-IPC-DebugSymbols-v${{steps.build.outputs.version}}
path: ${{steps.build.outputs.path}}/*.pdb
- name: Create draft release
id: create-release
if: github.ref_type == 'tag' && matrix.config != 'Debug'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{github.ref_name}}
tag_name: ${{github.ref_name}}
draft: true
body: "Write release notes here"
- name: Attach zip to release
if: github.ref_type == 'tag' && matrix.config != 'Debug'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_name: OpenKneeboard-OTD-IPC-v${{steps.build.outputs.version}}.zip
asset_path: ${{steps.build.outputs.path}}/OpenKneeboard-OTD-IPC.zip
asset_content_type: application/zip
- name: Attach test client to release
if: github.ref_type == 'tag' && matrix.config != 'Debug'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_name: OpenKneeboard-OTD-IPC-TestClient-v${{steps.build.outputs.version}}.exe
asset_path: ${{steps.build.outputs.path}}/OTDIPC-TestClient.exe
asset_content_type: application/x-ms-download
- name: Attach debug symbols
if: github.ref_type == 'tag' && matrix.config != 'Debug'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_name: OpenKneeboard-OTD-IPC-DebugSymbols-v${{steps.build.outputs.version}}.zip
asset_path: ${{steps.build.outputs.path}}/DebugSymbols.zip
asset_content_type: application/zip