version memes #479
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: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: build | |
runs-on: windows-latest | |
steps: | |
#clone, setup dotnet, restore packages | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup dotnet | |
uses: actions/setup-dotnet@v3 | |
- name: dotnet restore | |
run: dotnet restore | |
- name: setup sonarqube | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
uses: ./.github/actions/setup-sonar | |
#build with sonar analysis enabled | |
- name: Build and analyze | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: powershell | |
run: | | |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"FrankvdStam_SoulSplitter_AYT9tJW7QlZ0fhD27xsa" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.cs.opencover.reportsPaths=tests/**/*.xml | |
dotnet build src/soulsplitter/soulsplitter.csproj -c release /p:Platform=x64 | |
dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=opencover | |
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" | |
#Forked repo's don't have access to the repository secrets and are unable to run sonarqube analysis | |
- name: Build only | |
if: ${{ github.event.pull_request.head.repo.fork }} | |
shell: powershell | |
run: | | |
dotnet build src/soulsplitter/soulsplitter.csproj -c release /p:Platform=x64 | |
dotnet test | |
- name: Build CliTimer | |
shell: powershell | |
run: dotnet build src\CliTimer\CliTimer.csproj -c release /p:Platform=x64 | |
#Collect all the artifacts and publish them | |
- name: collect artifacts | |
run: | | |
mkdir artifact | |
mkdir artifact\CliTimer | |
copy src\SoulSplitter\bin\x64\Release\net481\SoulSplitter.dll artifact | |
copy src\SoulSplitter\bin\x64\Release\net481\SoulMemory.dll artifact | |
copy src\SoulSplitter\bin\x64\Release\net481\MaterialDesignColors.dll artifact | |
copy src\SoulSplitter\bin\x64\Release\net481\MaterialDesignThemes.Wpf.dll artifact | |
copy src\SoulMemory\soulmods\x86\soulmods.dll artifact\soulmods_x86.dll | |
copy src\SoulMemory\soulmods\x64\soulmods.dll artifact\soulmods_x64.dll | |
copy src\SoulSplitter\soulmemory-rs\x86\soulmemory_rs.dll artifact\soulmemory_rs_x86.dll | |
copy src\SoulSplitter\soulmemory-rs\x64\soulmemory_rs.dll artifact\soulmemory_rs_x64.dll | |
copy src\SoulSplitter\soulmemory-rs\x86\launcher.exe artifact\launcher_x86.dll | |
copy src\SoulSplitter\soulmemory-rs\x64\launcher.exe artifact\launcher_x64.dll | |
copy LICENSE artifact | |
copy src\SoulMemory\bin\x64\Release\*.nupkg artifact | |
copy src\CliTimer\bin\x64\release\net481\CliTimer.exe artifact\CliTimer | |
copy src\CliTimer\bin\x64\release\net481\CliTimer.exe.config artifact\CliTimer | |
copy src\CliTimer\bin\x64\release\net481\SoulMemory.dll artifact\CliTimer | |
- name: Publish SoulSplitter | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SoulSplitter | |
path: artifact |