Skip to content

Merge pull request #11 from sj-distributor/cache-double-deletion-stra… #70

Merge pull request #11 from sj-distributor/cache-double-deletion-stra…

Merge pull request #11 from sj-distributor/cache-double-deletion-stra… #70

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: .NET build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.12.0'
includePrerelease: true
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/[email protected]
- name: Display GitVersion outputs
run: |
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}"
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}"
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}"
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}"
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}"
echo "BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}"
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}"
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}"
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}"
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}"
echo "LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}"
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}"
echo "AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}"
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}"
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
echo "InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}"
echo "BranchName: ${{ steps.gitversion.outputs.branchName }}"
echo "EscapedBranchName: ${{ steps.gitversion.outputs.escapedBranchName }}"
echo "Sha: ${{ steps.gitversion.outputs.sha }}"
echo "ShortSha: ${{ steps.gitversion.outputs.shortSha }}"
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}"
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}"
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}"
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}"
echo "VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}"
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}"
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
- name: Setup .NET SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.100
- name: Set up Redis
uses: supercharge/[email protected]
with:
redis-version: 6
- name: Run tests
run: dotnet test --configuration=Release -p:Platform="Any CPU" --collect:"XPlat Code Coverage"
- name: Publish Code Coverage UnitTest
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ${{ github.workspace }}/UnitTests/TestResults/**/coverage.cobertura.xml
- name: Publish Code Coverage IntegrationTests
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ${{ github.workspace }}/IntegrationTests/TestResults/**/coverage.cobertura.xml
- name: Pack FastCache.Core
run: dotnet pack FastCache.Core -p:PackageVersion=${{ steps.gitversion.outputs.SemVer }} --configuration=Release -o Core
- name: show me the dir
run: ls -al ./Core
- name: Push FastCache.Core to nuget
run: dotnet nuget push ./Core/FastCache.Core.${{ steps.gitversion.outputs.SemVer }}.nupkg --api-key ${{secrets.NUGET}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
- name: Pack FastCache.InMemory
run: dotnet pack FastCache.InMemory -p:PackageVersion=${{ steps.gitversion.outputs.SemVer }} --configuration=Release -o InMemory
- name: Push FastCache.InMemory to nuget
run: dotnet nuget push ./InMemory/FastCache.InMemory.${{ steps.gitversion.outputs.SemVer }}.nupkg --api-key ${{secrets.NUGET}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
- name: Pack FastCache.Redis
run: dotnet pack FastCache.Redis -p:PackageVersion=${{ steps.gitversion.outputs.SemVer }} --configuration=Release -o Redis
- name: Push FastCache.Redis to nuget
run: dotnet nuget push ./Redis/FastCache.Redis.${{ steps.gitversion.outputs.SemVer }}.nupkg --api-key ${{secrets.NUGET}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
- name: Pack FastCache.MultiSource
run: dotnet pack FastCache.MultiSource -p:PackageVersion=${{ steps.gitversion.outputs.SemVer }} --configuration=Release -o MultiSource
- name: Push FastCache.Redis to nuget
run: dotnet nuget push ./MultiSource/FastCache.MultiSource.${{ steps.gitversion.outputs.SemVer }}.nupkg --api-key ${{secrets.NUGET}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols
# - name: Push to nuget
# run: dotnet nuget push artifacts/NetCoreCache.${{ steps.gitversion.outputs.SemVer }}.nupkg --skip-duplicate --no-symbols true --api-key ${{secrets.NUGET}} --source https://api.nuget.org/v3/index.json