Skip to content

Commit

Permalink
build: upgrade main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
phmatray committed Nov 26, 2023
1 parent d67db2c commit 422e2ae
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,21 @@ permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
run_test:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout Source Code
uses: actions/checkout@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- name: Run Unit Tests
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"

- name: Upload Code Coverage
uses: codecov/codecov-action@v3

create_nuget:
runs-on: ubuntu-latest
steps:
Expand All @@ -62,7 +66,7 @@ jobs:
if-no-files-found: error
retention-days: 7
path: ${{ env.NuGetDirectory }}/*.nupkg

validate_nuget:
runs-on: ubuntu-latest
needs: [ create_nuget ]
Expand All @@ -87,28 +91,25 @@ jobs:
- name: Validate package
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")

run_test:

update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout Source Code
uses: actions/checkout@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- name: Run Unit Tests
run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"

- name: Upload Code Coverage
uses: codecov/codecov-action@v3

- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
# Publish only when creating a GitHub Release
# https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
# You can update this logic if you want to manage releases differently
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: [ validate_nuget, run_test ]
needs: [ validate_nuget, run_test, update-release-draft ]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ A modern and robust C# Technical Analysis library based on the original open-sou

## Introduction

TaLibStandard is a modern interpretation of the widely used [TA-Lib](https://ta-lib.org), reimagined in C# 11. It is designed to be reliable, efficient, and user-friendly for developers performing financial market analysis. The addition of .NET's Generic Math feature allows for a richer, more flexible library that can handle a variety of number types.
TaLibStandard is a modern interpretation of the widely used [TA-Lib](https://ta-lib.org), reimagined in C# 12. It is designed to be reliable, efficient, and user-friendly for developers performing financial market analysis. The addition of .NET's Generic Math feature allows for a richer, more flexible library that can handle a variety of number types.

## Goal

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "feature",
"allowPrerelease": true
"rollForward": "latestMajor",
"allowPrerelease": false
}
}

0 comments on commit 422e2ae

Please sign in to comment.