V9.0.1/housekeeping #21
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Globalization Ext. CI/CD Pipeline | |
on: | |
pull_request: | |
paths-ignore: | |
- .codecov | |
- .docfx | |
- .github | |
- .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 }} | |
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 globalization.snk file | |
uses: codebeltnet/gcp-download-file@v1 | |
with: | |
serviceAccountKey: ${{ secrets.GCP_TOKEN }} | |
bucketName: ${{ secrets.GCP_BUCKETNAME }} | |
objectName: globalization.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-22.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-22.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: globalization | |
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/globalization | |
secrets: inherit | |
codeql: | |
name: call-codeql | |
needs: [build,test] | |
uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1 | |
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, test, sonarcloud, codecov, codeql] | |
environment: Production | |
steps: | |
- uses: codebeltnet/nuget-push@v1 | |
with: | |
token: ${{ secrets.NUGET_TOKEN }} | |
configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }} |