Build and release to repository #30
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
run-name: Build and release to repository | ||
on: | ||
push: | ||
tags: | ||
- v** | ||
- latest | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Version tag (latest if none provided)' | ||
required: false | ||
default: latest | ||
type: string | ||
jobs: | ||
build: | ||
name: Build WatchDog | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ ${GITHUB_REF#refs/*/} || inputs.tag }} | ||
Check failure on line 22 in .github/workflows/release.yml GitHub Actions / .github/workflows/release.ymlInvalid workflow file
|
||
- name: Restore NuGet dependencies | ||
shell: powershell | ||
run: 'C:\Program` Files\Microsoft` Visual` Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe -t:restore' | ||
- name: Build binary | ||
shell: powershell | ||
run: 'C:\Program` Files\Microsoft` Visual` Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe AMRPC` WatchDog` Desktop.sln /p:Configuration=Release' | ||
- name: Compress binary | ||
shell: powershell | ||
run: ' Compress-Archive .\AMRPC` WatchDog` Desktop\bin\Release\* watchdog.zip' | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: watchdog-build | ||
path: watchdog.zip | ||
create_release: | ||
name: Create release | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ ${GITHUB_REF#refs/*/} || inputs.tag }} | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: watchdog-build | ||
- name: Create release | ||
id: create_release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'watchdog.zip' | ||
tag: ${{ ${GITHUB_REF#refs/*/} || inputs.tag }} | ||
replacesArtifacts: true | ||
allowUpdates: true | ||
bodyFile: "install_instructions.md" |