Skip to content

Update issue templates #27

Update issue templates

Update issue templates #27

Workflow file for this run

name: "Deveel Filters CI/CD"
permissions:
contents: read
packages: write
on:
push:
branches: [main]
jobs:
version:
name: "Calculate Version"
runs-on: ubuntu-latest
outputs:
version: ${{ steps.gitversion.outputs.SemVer }}
nuget-version: ${{ steps.gitversion.outputs.NuGetVersionV2 }}
assembly-version: ${{ steps.gitversion.outputs.AssemblySemVer }}
file-version: ${{ steps.gitversion.outputs.AssemblySemFileVer }}
informational-version: ${{ steps.gitversion.outputs.InformationalVersion }}
is-pre-release: ${{ steps.gitversion.outputs.PreReleaseTag != '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # GitVersion needs full history
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.10.2
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.10.2
with:
useConfigFile: true
- name: Display GitVersion outputs
run: |
echo "Version: ${{ steps.gitversion.outputs.SemVer }}"
echo "NuGet Version: ${{ steps.gitversion.outputs.NuGetVersionV2 }}"
echo "Assembly Version: ${{ steps.gitversion.outputs.AssemblySemVer }}"
echo "File Version: ${{ steps.gitversion.outputs.AssemblySemFileVer }}"
echo "Informational Version: ${{ steps.gitversion.outputs.InformationalVersion }}"
echo "Is Pre-release: ${{ steps.gitversion.outputs.PreReleaseTag != '' }}"
build:
name: "Build (.NET ${{ matrix.dotnet-version }})"
needs: version
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dotnet-version: '6.0.x'
dotnet-moniker: 'net6.0'
- dotnet-version: '7.0.x'
dotnet-moniker: 'net7.0'
- dotnet-version: '8.0.x'
dotnet-moniker: 'net8.0'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # GitVersion needs full history
- name: "Setup .NET ${{ matrix.dotnet-version }}"
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: "Restore"
run: dotnet restore -p:TargetFramework=${{ matrix.dotnet-moniker }}
- name: "Build"
run: |
dotnet build -c Release --no-restore --framework ${{ matrix.dotnet-moniker }} \
-p:Version=${{ needs.version.outputs.version }} \
-p:AssemblyVersion=${{ needs.version.outputs.assembly-version }} \
-p:FileVersion=${{ needs.version.outputs.file-version }} \
-p:InformationalVersion=${{ needs.version.outputs.informational-version }}
- name: "Test"
run: |
dotnet test -c Release --no-restore --no-build --verbosity normal --framework ${{ matrix.dotnet-moniker }} \
/p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish:
name: "Publish Packages"
needs: [version, build]
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/publish-packages.yml
with:
version: ${{ needs.version.outputs.nuget-version }}
assembly-version: ${{ needs.version.outputs.assembly-version }}
file-version: ${{ needs.version.outputs.file-version }}
informational-version: ${{ needs.version.outputs.informational-version }}
nuget: false # Only publish to GitHub Packages for CI builds
clean:
name: Cleaning Old Packages
needs: publish
uses: ./.github/workflows/clean-packages.yml