Skip to content

Bump Backport.System.Threading.Lock to 3.1.0 #24

Bump Backport.System.Threading.Lock to 3.1.0

Bump Backport.System.Threading.Lock to 3.1.0 #24

name: Cuemon CI/CD Pipeline (Delayed)
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
jobs:
build:
name: 🛠️ Build
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
configuration: [Debug, Release]
framework: [net9.0, net8.0, netstandard2.0]
outputs:
version: ${{ steps.minver-calculate.outputs.version }}
projects: ${{ steps.projects.outputs.result }}
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 cuemon.snk file
uses: codebeltnet/gcp-download-file@v1
with:
serviceAccountKey: ${{ secrets.GCP_TOKEN }}
bucketName: ${{ secrets.GCP_BUCKETNAME }}
objectName: cuemon.snk
- id: projects
name: Set environment variable for projects
run: |
if [ "${{ matrix.framework }}" == "netstandard2.0" ]; then
projects=(
"src/**/Cuemon.Extensions.Globalization.csproj"
)
echo "result=$(IFS=' '; echo "${projects[*]}")" >> $GITHUB_OUTPUT
else
projects=(
"src/**/Cuemon.Core.App.csproj"
"src/**/Cuemon.Extensions.Globalization.csproj"
)
echo "result=$(IFS=' '; echo "${projects[*]}")" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
- id: dotnet-build
name: Build for ${{ matrix.framework }} (${{ matrix.configuration }})
uses: codebeltnet/dotnet-build@v2
with:
projects: ${{ steps.projects.outputs.result }}
configuration: ${{ matrix.configuration }}
framework: ${{ matrix.framework }}
uploadBuildArtifactName: 'DelayedBuild.${{ matrix.framework }}.${{ matrix.configuration }}'
pack:
name: 📦 Pack
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
configuration: [Debug, Release]
needs: [build]
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1
- 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 }}
downloadBuildArtifactPattern: 'DelayedBuild.*.${{ matrix.configuration }}'
uploadPackedArtifactName: 'NuGet-Delayed-${{ matrix.configuration }}'
projects: >-
src/**/Cuemon.Core.App.csproj
src/**/Cuemon.Extensions.Globalization.csproj
deploy:
if: github.event_name != 'pull_request'
name: 🚀 Deploy v${{ needs.build.outputs.version }}
runs-on: ubuntu-22.04
timeout-minutes: 15
needs: [build, pack]
environment: Production
steps:
- uses: codebeltnet/nuget-push@v1
with:
token: ${{ secrets.NUGET_TOKEN }}
configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
downloadBuildArtifactName: NuGet-Delayed-${{ inputs.configuration == '' && 'Release' || inputs.configuration }}