Added NCrontab to readme #32
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
name: build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: nuget/setup-nuget@v1 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1.3 | |
- name: Update version | |
run: | | |
(Get-Content -Path src\CronExpressionsVsix\source.extension.vsixmanifest) | | |
ForEach-Object {$_ -Replace '1.0.0', '1.0.${{ github.run_number }}'} | | |
Set-Content -Path src\CronExpressionsVsix\source.extension.vsixmanifest | |
(Get-Content -Path src\CronExpressions.Analyzers\CronExpressions.Analyers.csproj) | | |
ForEach-Object {$_ -Replace '1.0.0.0', '1.0.${{ github.run_number }}.0'} | | |
Set-Content -Path src\CronExpressions.Analyzers\CronExpressions.Analyers.csproj | |
- name: Restore | |
run: nuget restore | |
- name: Build | |
run: msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m | |
- name: Test | |
run: dotnet vstest test\CronExpressions.Test\bin\Release\net472\CronExpressions.Test.dll | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: CronExpressions.vsix | |
path: src\CronExpressionsVsix\bin\Release\CronExpressionsVsix.vsix | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: CronExpressions.Analyzers.1.0.${{ github.run_number }}.nupkg | |
path: src\CronExpressions.Analyzers\bin\Release\CronExpressions.Analyzers.1.0.${{ github.run_number }}.nupkg | |
- name: Push CronExpressions.Analyers to nuget.org | |
run: dotnet nuget push src\CronExpressions.Analyzers\bin\Release\CronExpressions.Analyzers.1.0.${{ github.run_number }}.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
if: ${{ github.event_name == 'push' }} |