Skip to content

Build and release to repository #30

Build and release to repository

Build and release to repository #30

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 22, Col: 16): Unexpected symbol: '${GITHUB_REF#refs/*/}'. Located at position 1 within expression: ${GITHUB_REF#refs/*/} || inputs.tag .github/workflows/release.yml (Line: 44, Col: 16): Unexpected symbol: '${GITHUB_REF#refs/*/}'. Located at position 1 within expression: ${GITHUB_REF#refs/*/} || inputs.tag
- 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"