Skip to content

Workflows up to date #3

Workflows up to date

Workflows up to date #3

Workflow file for this run

name: SIT CI
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- '.github/**'
- '*.md'
branches:
- "master"
workflow_dispatch:
jobs:
Build-SIT:
strategy:
matrix:
configuration: [Debug]
runs-on: windows-latest
env:
SolutionName: StayInTarkov
CSProj: Source/StayInTarkov.csproj
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]
# Restore all projects
- name: dotnet Restore
run: dotnet restore
# Build the project
- name: dotnet Publish
run: |
mkdir ${{ env.SolutionName }}-${{ matrix.configuration }}
dotnet build ${{ env.CSProj }} -c ${{ matrix.configuration }} -o ${{ env.SolutionName }}-${{ matrix.configuration }}
# Remove unnecessary files
- name: Remove unnecessary files
run: |
del ${{ env.SolutionName }}-${{ matrix.configuration }}\StayInTarkov.pdb
# Zip remaining files
- name: Zip remaining files
run: |
Compress-Archive -Path ${{ env.SolutionName }}-${{ matrix.configuration }} -DestinationPath ${{ env.SolutionName }}-${{ matrix.configuration }}.zip
# Upload artifact with github commit SHA
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.SolutionName }}-${{ matrix.configuration }}-${{ github.sha }}
path: ${{ env.SolutionName }}-${{ matrix.configuration }}\
if-no-files-found: error