Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Computr1x committed Dec 2, 2023
1 parent 618e33f commit c2fed71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: .NET

on:
push:
branches: [ "master" ]
branches: [ "test" ]
pull_request:
branches: [ "master" ]
branches: [ "test" ]

jobs:
build:
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
env:
BUILD_CONFIG: 'Release'
PROJECT: './ExNihilo/ExNihilo.csproj'
TESTS: './Tests/Tests.csproj'

runs-on: ubuntu-latest

Expand All @@ -27,8 +26,6 @@ jobs:
# Setup .net env
- uses: actions/checkout@v4
with:
ref: master
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
Expand All @@ -40,27 +37,15 @@ jobs:
# Restore dependencies
- name: Restore dependencies project
run: dotnet restore $PROJECT
- name: Restore dependencies tests
run: dotnet restore $TESTS

# Run tests
- name: Build tests
run: dotnet build $TESTS --configuration $BUILD_CONFIG --no-restore
- name: Run tests
run: dotnet test /p:Configuration=$BUILD_CONFIG --no-restore --no-build --verbosity normal


# Create release
- name: Pack project
run: dotnet pack $PROJECT --configuration $BUILD_CONFIG --no-restore
- uses: "marvinpinto/action-automatic-releases@latest"
run: dotnet pack $PROJECT -p:PackageVersion=$VERSION -o ./out --configuration $BUILD_CONFIG --no-restore

- uses: ncipollo/release-action@v1
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
title: "Release v${{ env.VERSION }}"
prerelease: false
files: |
./ExNihilo/ExNihilo/out/*.nupkg
./ExNihilo/ExNihilo/ExNihilo/bin/${BUILD_CONFIG}/net*/ExNihilo.dll
generateReleaseNotes: true
artifacts: "out/*.nupkg,**/bin/*/*/ExNihilo.dll"

#- name: Push generated package to Nuget registry
# run: dotnet nuget push **\*.nupkg --skip-duplicate -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}

0 comments on commit c2fed71

Please sign in to comment.