Skip to content

Initial work to introduce new csv changes #230

Initial work to introduce new csv changes

Initial work to introduce new csv changes #230

Workflow file for this run

name: Build and Release
on: [push]
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Cache NuGet Packages
uses: actions/cache@v3
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: ./tests/UnitTests
- 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@v3
with:
name: sdk-packages
path: |
src/bin/Release/*.nupkg
src/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 OoplesFinance.YahooFinanceAPI.Coverage.xml
publish-sdk:
name: Publish SDK Binaries
runs-on: ubuntu-latest
needs: build
if: github.repository == 'ooples/OoplesFinance.YahooFinanceAPI'
steps:
- name: Load SDK Packages
uses: actions/download-artifact@v4.1.7
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: Publish Github Packages
uses: tanaka-takayoshi/nuget-publish-to-github-packages-action@v2.1
with:
nupkg-path: './artifacts/*.nupkg'
repo-owner: 'ooples'
gh-user: 'ooples'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: SDK ${{ github.ref }}
draft: true