From c2fed716306a843fa60592b1ebee777036d1f92c Mon Sep 17 00:00:00 2001 From: Computrix Date: Sun, 3 Dec 2023 00:25:54 +0300 Subject: [PATCH] Update workflow --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish.yml | 27 ++++++--------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7536cfa..820a4ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,9 @@ name: .NET on: push: - branches: [ "master" ] + branches: [ "test" ] pull_request: - branches: [ "master" ] + branches: [ "test" ] jobs: build: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6588dbe..82b68fd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,6 @@ jobs: env: BUILD_CONFIG: 'Release' PROJECT: './ExNihilo/ExNihilo.csproj' - TESTS: './Tests/Tests.csproj' runs-on: ubuntu-latest @@ -27,8 +26,6 @@ jobs: # Setup .net env - uses: actions/checkout@v4 - with: - ref: master - name: Setup .NET uses: actions/setup-dotnet@v3 with: @@ -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}}