Merge pull request #53 from hburn7/hotfix/duplicate-message-received-… #48
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
name: Release | |
# Run on every commit tag which begins with "v" | |
on: | |
push: | |
tags: | |
- "v*" | |
# Automatically create a GitHub Release with details from previous commits | |
jobs: | |
release: | |
name: "Release" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
deploy-to-nuget-if-updated: | |
needs: release | |
name: "Deploy binaries" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.x | |
- name: Install dependencies | |
run: dotnet restore "${{ github.workspace }}/BanchoSharp/BanchoSharp.csproj" | |
- name: Build | |
run: dotnet build "${{ github.workspace }}/BanchoSharp/BanchoSharp.csproj" --configuration Release --no-restore | |
- name: Test | |
run: dotnet test "${{ github.workspace }}/BanchoSharp/BanchoSharp.csproj" --no-restore --verbosity normal | |
- name: Publish | |
run: | | |
dotnet publish "${{ github.workspace }}/BanchoSharp/BanchoSharp.csproj" -c Release -o BanchoSharp | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "${{ github.workspace }}/BanchoSharp/BanchoSharp.dll" | |
asset_name: BanchoSharp.dll | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Publish to NuGet on version change | |
id: publish_nuget | |
uses: brandedoutcast/publish-nuget@v2.5.2 | |
with: | |
NUGET_KEY: "${{ secrets.NUGET_API_KEY }}" | |
PROJECT_FILE_PATH: "BanchoSharp/BanchoSharp.csproj" | |
VERSION_REGEX: "<PackageVersion>(.*)</PackageVersion>" | |
TAG_COMMIT: false |