Skip to content

chore(deps): update dependency coverlet.collector to 6.0.3 (#224) #151

chore(deps): update dependency coverlet.collector to 6.0.3 (#224)

chore(deps): update dependency coverlet.collector to 6.0.3 (#224) #151

Workflow file for this run

on:
push:
branches: [ main ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# and creating releases.
permissions:
actions: read
pages: write
id-token: write
contents: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "publish"
cancel-in-progress: false
name: Release
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
should-release: ${{ steps.confirm-release.outputs.test }}
branch: ${{ steps.get-branch.outputs.branch }}
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8
- name: Get version
id: get-version
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
- name: Get branch
id: get-branch
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_OUTPUT
- name: Confirm release
id: confirm-release
run: echo "test=$(git tag --list 'v${{ steps.get-version.outputs.version }}' | wc -l | sed s/\ //g)" >> $GITHUB_OUTPUT
- name: Install dependencies
run: dotnet restore
# Build the data processing library
- name: Build DataProcessing
run: dotnet build Cognite.DataProcessing/Cognite.DataProcessing.csproj --configuration Release --no-restore -p:PackageVersion=${{ steps.get-version.outputs.version }}
- name: Pack project
run: dotnet pack Cognite.DataProcessing/Cognite.DataProcessing.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ steps.get-version.outputs.version }} --no-build
# Build the extensions library
- name: Build Extensions
run: dotnet build Cognite.Simulator.Extensions/Cognite.Simulator.Extensions.csproj --configuration Release --no-restore -p:PackageVersion=${{ steps.get-version.outputs.version }}
- name: Pack project
run: dotnet pack Cognite.Simulator.Extensions/Cognite.Simulator.Extensions.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ steps.get-version.outputs.version }} --no-build
# Build the utils library
- name: Build Utils
run: dotnet build Cognite.Simulator.Utils/Cognite.Simulator.Utils.csproj --configuration Release --no-restore -p:PackageVersion=${{ steps.get-version.outputs.version }}
- name: Pack project
run: dotnet pack Cognite.Simulator.Utils/Cognite.Simulator.Utils.csproj --output nuget-packages --configuration Release -p:PackageVersion=${{ steps.get-version.outputs.version }} --no-build
- name: Package will be released
if: ${{ steps.confirm-release.outputs.test == 0 }}
run: echo "Will release nuget package"
- name: Upload nuget packages
uses: actions/upload-artifact@v4
if: ${{ steps.get-branch.outputs.branch == 'main' && steps.confirm-release.outputs.test == 0 }}
with:
name: nuget-packages
path: nuget-packages/
retention-days: 1
publish:
name: Create Release
runs-on: windows-latest
environment: CD
if: ${{ needs.build.outputs.branch == 'main' && needs.build.outputs.should-release == 0 }}
needs:
- build
steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8
- name: Download nuget packages
uses: actions/download-artifact@v4
with:
name: nuget-packages
path: nuget-packages/
- name: Sign nuget packages
env:
CERTIFICATE_HOST: ${{ secrets.CODE_SIGNING_CERT_HOST }}
CERTIFICATE_HOST_API_KEY: ${{ secrets.CODE_SIGNING_CERT_HOST_API_KEY }}
CERTIFICATE_SHA1_HASH: ${{ secrets.CODE_SIGNING_CERT_SHA1_HASH }}
CLIENT_CERTIFICATE: ${{ secrets.CODE_SIGNING_CLIENT_CERT }}
CLIENT_CERTIFICATE_PASSWORD: ${{ secrets.CODE_SIGNING_CLIENT_CERT_PASSWORD }}
KEYPAIR_ALIAS: ${{ secrets.CODE_SIGNING_KEYPAIR_ALIAS }}
uses: cognitedata/code-sign-action/@v3
with:
path-to-binary: 'nuget-packages/'
- name: Push nuget packages
run: dotnet nuget push .\nuget-packages\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
continue-on-error: false
- name: Create Release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.build.outputs.version }}
release_name: Release v${{ needs.build.outputs.version }}
draft: false
prerelease: false
publish-docs:
environment:
name: CD
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8
- name: Restore docfx
run: dotnet tool restore
working-directory: docfx_project
- name: Build docfx-powered documentation site
run: dotnet tool run docfx ./docfx.json
working-directory: docfx_project
- name: Upload Documentation Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docfx_project/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4