Skip to content

Prepare release 7.1.3 of SDK #1942

Prepare release 7.1.3 of SDK

Prepare release 7.1.3 of SDK #1942

Workflow file for this run

name: Build and Release
on: [push]
permissions:
contents: write
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup .NET 8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache NuGet Packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore .NET Tools
run: dotnet tool restore
working-directory: ./Alpaca.Markets.Tests
- name: Dotnet Test (Debug)
run: dotnet dotcover test --dcXML=Configuration.xml
- name: Dotnet Build (Release)
run: dotnet build -c Release
- name: Save SDK Packages
uses: actions/upload-artifact@v4
if: github.repository == 'alpacahq/alpaca-trade-api-csharp' && startsWith(github.ref, 'refs/tags/sdk')
with:
retention-days: 1
compression-level: 0
name: sdk-packages
path: |
Alpaca.Markets/bin/Release/*.nupkg
Alpaca.Markets/bin/Release/*.snupkg
- name: Save Extensions Packages
uses: actions/upload-artifact@v4
if: github.repository == 'alpacahq/alpaca-trade-api-csharp' && startsWith(github.ref, 'refs/tags/ext')
with:
retention-days: 1
compression-level: 0
name: ext-packages
path: |
Alpaca.Markets.Extensions/bin/Release/*.nupkg
Alpaca.Markets.Extensions/bin/Release/*.snupkg
- name: Send Coverage to Codacy
if: "${{env.CODACY_PROJECT_TOKEN != ''}}"
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r Alpaca.Markets.Coverage.xml
publish-sdk:
name: Publish SDK Binaries
runs-on: ubuntu-latest
needs: build
if: github.repository == 'alpacahq/alpaca-trade-api-csharp' && startsWith(github.ref, 'refs/tags/sdk')
steps:
- name: Load SDK Packages
uses: actions/download-artifact@v4
with:
name: sdk-packages
- name: Create NuGet Version
run: dotnet nuget push **.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: SDK ${{ github.ref }}
draft: true
publish-ext:
name: Publish Extensions Binaries
runs-on: ubuntu-latest
needs: build
if: github.repository == 'alpacahq/alpaca-trade-api-csharp' && startsWith(github.ref, 'refs/tags/ext')
steps:
- name: Load Extensions Packages
uses: actions/download-artifact@v4
with:
name: ext-packages
- name: Create NuGet Version
run: dotnet nuget push **.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Extensions ${{ github.ref }}
draft: true