chore(deps): update dependency microsoft.identity.client to 4.66.2 #863
This file contains 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
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
name: Create Release | |
jobs: | |
build: | |
name: Create 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: 7 | |
- 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 | |
- name: Build for publish | |
run: dotnet build --configuration Release --no-restore -p:PackageVersion=${{ steps.get-version.outputs.version }} -p:FileVersion=${{ steps.get-version.outputs.version }} -p:InformationalVersion=${{ steps.get-version.outputs.version }} | |
- name: Dotnet pack | |
run: dotnet pack -c release -p:PackageVersion=${{ steps.get-version.outputs.version }} -p:FileVersion=${{ steps.get-version.outputs.version }} -p:InformationalVersion=${{ steps.get-version.outputs.version }} --no-build --output nuget-packages | |
- 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 == 'master' && steps.confirm-release.outputs.test == 0 }} | |
with: | |
name: nuget-packages | |
path: nuget-packages/ | |
retention-days: 1 | |
- name: Install docfx | |
run: dotnet tool update -g docfx | |
- name: Build documentation | |
run: docfx docfx_project/docfx.json | |
- name: Deploy documentation to github pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
if: ${{ steps.get-branch.outputs.branch == 'master' && steps.confirm-release.outputs.test == 0 }} | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docfx_project/_site | |
COMMIT_MESSAGE: Release ${{ github.ref }} | |
publish: | |
name: Create Release | |
runs-on: windows-latest | |
environment: CD | |
if: ${{ needs.build.outputs.branch == 'master' && needs.build.outputs.should-release == 0 }} | |
needs: | |
- build | |
steps: | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7 | |
- 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@master | |
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 |