Merge pull request #72 from GravityWolfNotAmused/fix-somethings #129
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: Build Artifact for Windows Dev | |
on: | |
push: | |
branches: [ "dev" ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/[email protected] | |
- 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 --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Publish | |
run: dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained true -p:PublishTrimmed=true -p:UseAppHost=true | |
- name: Create Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playercountbot-${{ steps.branch-name.outputs.current_branch }}-${{steps.date.outputs.date}} | |
path: ./DiscordPlayerCountBot/bin/Release/net6.0/win-x64/publish |