Skip to content

Bump gittools/actions from 0.10.2 to 0.13.2 #226

Bump gittools/actions from 0.10.2 to 0.13.2

Bump gittools/actions from 0.10.2 to 0.13.2 #226

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'
- name: Install Dependencies
run: dotnet restore ObjPropsDynamicSetter.sln
- name: Build
run: dotnet build ObjPropsDynamicSetter.sln -c Release --no-restore
- name: Run Unit Tests
run: dotnet test test/*.Unit/*.csproj -c Release --no-restore --no-build --collect:"XPlat Code Coverage"
- name: Upload Coverage Report to Codecov
uses: codecov/codecov-action@v3
mutation-tests:
needs: test
runs-on: ubuntu-latest
if: ${{ github.repository == 'Molnix888/obj-props-dynamic-setter' && github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'
- name: Install Stryker
run: dotnet tool install -g dotnet-stryker
- name: Mutation Tests
run: |
cd test/*.Unit
dotnet stryker -level Complete -ca perTestInIsolation -r "['dashboard']" --dashboard-api-key "${{ secrets.STRYKER_API_KEY }}" --dashboard-project "github.com/Molnix888/obj-props-dynamic-setter" --dashboard-version "${GITHUB_REF##*/}"
publish:
needs: test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.13.2
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.13.2
- name: Add GitHub Packages Source
run: dotnet nuget add source https://nuget.pkg.github.com/Molnix888/index.json -n github -u Molnix888 -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Pack
run: dotnet pack src/ObjPropsDynamicSetter/*.csproj -o nuget -c Release -p:PackageVersion=${{ steps.gitversion.outputs.semVer }}
- name: Publish to NuGet
run: dotnet nuget push nuget/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json -n --skip-duplicate
- name: Publish to GitHub Packages
run: dotnet nuget push nuget/*.nupkg -s "github" -n true --skip-duplicate