Skip to content

Commit

Permalink
Improve the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeoriani committed Jun 4, 2024
1 parent 2e7ac99 commit 9a85b51
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Build

on:
push:
branches: [ master ]
branches:
- main
pull_request:
branches: [ master ]
branches:
- main

defaults:
run:
Expand All @@ -13,24 +15,26 @@ defaults:
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: 3.1.101
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal

# - name: Create the Package
# run: dotnet pack --configuration Release

# - name: Publish Nuget
# run: dotnet nuget push "Fynance/bin/Release/*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source "https://api.nuget.org/v3/index.json"
- name: Checkout code
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-restore --verbosity normal --configuration Release

- name: Create NuGet package
run: dotnet pack --configuration Release --no-build --output ./nupkg
# - name: Publish Nuget
# run: dotnet nuget push ./Fynance/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source "https://api.nuget.org/v3/index.json"

0 comments on commit 9a85b51

Please sign in to comment.