Skip to content

[MDAPI-96] [.NET] Retrieve latest events from feed (#85) #565

[MDAPI-96] [.NET] Retrieve latest events from feed (#85)

[MDAPI-96] [.NET] Retrieve latest events from feed (#85) #565

Workflow file for this run

name: "CI"
on:
push:
pull_request:
workflow_dispatch:
jobs:
build_and_test:
name: Build & Test on ${{ matrix.OS_NAME }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
OS_NAME: win-x64
- os: ubuntu-latest
OS_NAME: linux-x64
- os: macos-latest
OS_NAME: osx-arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore Dependencies
run: dotnet restore
- name: Build Project
run: dotnet build -c Release --no-restore
- name: Test Project
run: dotnet test --configuration Release --no-build --verbosity normal --logger:"console;verbosity=normal"
- name: Pack Project
run: dotnet pack src/DxFeed.Graal.Net -c Release
release:
needs: build_and_test
if: (startsWith(github.event.ref, 'refs/tags/'))
name: Release
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Publish
run: |
dotnet tool install -g dotnet-script
dotnet script publish.csx
shell: bash
- name: Upload
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
artifacts/Publish/DxFeed.Graal.Net.Tools/*.zip
artifacts/Publish/Samples/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
- name: Pack NuGet
run: dotnet pack src/DxFeed.Graal.Net -c Release --property:PackageOutputPath=${{ github.workspace }}/artifacts/Packages
- name: Upload NuGet
run: |
nuget push artifacts/Packages/DxFeed.Graal.Net.${{ github.ref_name }}.nupkg \
-Source ${{ secrets.JFROG_PATH }}/${{ github.ref_name }} \
-ApiKey ${{ secrets.JFROG_API_KEY }}
shell: bash
build_and_upload_docs:
needs: release
if: (startsWith(github.event.ref, 'refs/tags/'))
name: Build & Upload Docs
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Restore Dependencies
run: dotnet restore
- name: Build Project
run: dotnet build -c Release --no-restore
- name: Install DocFX
run: dotnet tool update -g docfx
- name: Prepare Tag
id: prepare_tag
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "DEPLOY_TAG_NAME=deploy-${TAG_NAME}" >> "${GITHUB_OUTPUT}"
- name: Build Doc
run: ./build_doc.cmd
- name: Upload Doc
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: artifacts/Documentation
tag_name: ${{ steps.prepare_tag.outputs.DEPLOY_TAG_NAME }}
commit_message: 'deploy: ${{ github.ref_name }}'
allow_empty_commit: true