YAVAPF/.github/workflows/create-release.yaml

49 lines
1.3 KiB
YAML

name: Create release on tag push
on:
push:
tags:
- 'release/*'
jobs:
build:
name: Build YAVAPF
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Install VoiceAttack
run: |
curl.exe -o VoiceAttackSetup.exe https://voiceattack.com/FileSend.aspx?id=VoiceAttackInstaller64.exe
.\VoiceAttackSetup /sp- /verysilent /suppressmsgboxes /norestart /nocloseapplications /norestartapplications /noicons
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup .Net
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c release
- name: Run tests
run: dotnet test
- name: Create NuGet package
run: dotnet pack -c release
- name: Push NuGet package
run: dotnet nuget push "VoiceAttack-Framework/bin/Release/alterNERDtive.YAVAPF.*.nupkg" -source 'https://api.nuget.org/v3/index.json' -apikey ${{secrets.NUGET_AUTH_TOKEN}}
- name: Draft release
uses: ncipollo/release-action@v1
with:
artifacts: "VoiceAttack-Framework/bin/Release/alterNERDtive.YAVAPF.*nupkg"
bodyFile: "CHANGELOG.md"
draft: true