Skip to content

V9.0.2/package maintenance #22

V9.0.2/package maintenance

V9.0.2/package maintenance #22

Workflow file for this run

name: Asp.Versioning Ext. CI/CD Pipeline
on:
pull_request:
branches: [main]
paths-ignore:
- .codecov/**
- .docfx/**
- .nuget/**
- '**/*.md'
workflow_dispatch:
inputs:
configuration:
type: choice
description: The build configuration to use in the deploy stage.
required: true
default: Release
options:
- Debug
- Release
permissions:
contents: read
jobs:
build:
name: 🛠️ Build
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
matrix:
configuration: [Debug, Release]
framework: [net9.0,net8.0]
outputs:
version: ${{ steps.minver-calculate.outputs.version }}
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1
- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true
- name: Install MinVer
uses: codebeltnet/dotnet-tool-install-minver@v1
- id: minver-calculate
name: Calculate Version
uses: codebeltnet/minver-calculate@v2
- name: Download versioning.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: versioning.snk
- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
- name: Build for ${{ matrix.framework }} (${{ matrix.configuration }})
uses: codebeltnet/dotnet-build@v2
with:
configuration: ${{ matrix.configuration }}
framework: ${{ matrix.framework }}
pack:
name: 📦 Pack
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
matrix:
configuration: [Debug, Release]
needs: [build]
steps:
- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true
- name: Pack for ${{ matrix.configuration }}
uses: codebeltnet/dotnet-pack@v2
with:
configuration: ${{ matrix.configuration }}
uploadPackedArtifact: true
version: ${{ needs.build.outputs.version }}
test:
name: 🧪 Test
needs: [build]
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022]
configuration: [Debug, Release]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1
- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true
- name: Install .NET Tool - Report Generator
uses: codebeltnet/dotnet-tool-install-reportgenerator@v1
- name: Test with ${{ matrix.configuration }} build
uses: codebeltnet/dotnet-test@v3
with:
configuration: ${{ matrix.configuration }}
buildSwitches: -p:SkipSignAssembly=true
sonarcloud:
name: call-sonarcloud
needs: [build,test]
uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v1
with:
organization: geekle
projectKey: asp-versioning
version: ${{ needs.build.outputs.version }}
secrets: inherit
codecov:
name: call-codecov
needs: [build,test]
uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1
with:
repository: codebeltnet/asp-versioning
secrets: inherit
codeql:
name: call-codeql
needs: [build,test]
uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1
permissions:
security-events: write
deploy:
if: github.event_name != 'pull_request'
name: call-nuget
needs: [build,pack,test,sonarcloud,codecov,codeql]
uses: codebeltnet/jobs-nuget/.github/workflows/default.yml@v1
with:
version: ${{ needs.build.outputs.version }}
environment: Production
configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
permissions:
contents: write
packages: write
secrets: inherit