Update docs #83
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: Compile and Deploy | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout | |
- name: Setup MSBuild Path | |
uses: microsoft/setup-msbuild@v1 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
- name: Restore NuGet Packages | |
run: nuget restore DiscordAudioStream.sln | |
- name: Generate Build ID | |
run: (Get-Content .\DiscordAudioStream\Startup\BuildInfo.cs) -replace '__BUILD_ID__', (Get-Date -UFormat %s -Millisecond 0) | Out-File .\DiscordAudioStream\Startup\BuildInfo.cs | |
- name: Build | |
run: msbuild DiscordAudioStream.sln /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: Release artifact | |
path: DiscordAudioStream\bin\Release\net472\DiscordAudioStream.exe | |
- name: Remove latest release | |
uses: dev-drprasad/[email protected] | |
with: | |
keep_latest: 0 | |
delete_tag_pattern: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Update latest tag | |
uses: richardsimko/update-tag@v1 | |
with: | |
tag_name: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: latest | |
prerelease: true | |
name: Latest Build | |
generate_release_notes: true | |
files: DiscordAudioStream/bin/Release/net472/DiscordAudioStream.exe | |