diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml deleted file mode 100644 index f556d86..0000000 --- a/.github/workflows/build-test.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Build and test - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ '*' ] - - -env: - working-directory: Sources - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - DOTNET_NOLOGO: true - dotnet-version: 8.0.x - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - run: git config --global core.autocrlf input - - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.dotnet-version }} - - - name: Restore dependencies - run: dotnet restore - working-directory: ${{ env.working-directory }} - - - name: Build - run: dotnet build -c Release --no-restore --verbosity normal - working-directory: ${{ env.working-directory }} - - - name: Test - run: dotnet test -c Release --no-build --verbosity normal - working-directory: ${{ env.working-directory }} diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..bd6f71c --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,13 @@ +name: ci + +on: + push: + pull_request: + +jobs: + build: + uses: Kysect/.github/.github/workflows/dotnet-releaser.yaml@master + with: + dotnet-version: '8.0' + secrets: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml deleted file mode 100644 index b618ec8..0000000 --- a/.github/workflows/nuget-publish.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Publish nuget - -on: - push: - branches: [ "master" ] - -env: - working-directory: Sources - release-directory: ./artifacts/package/release - dotnet-version: 8.0.x - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - run: git config --global core.autocrlf input - - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ env.dotnet-version }} - - - name: Restore dependencies - run: dotnet restore - working-directory: ${{ env.working-directory }} - - - name: Build - run: dotnet build -c Release /p:ContinuousIntegrationBuild=true --no-restore --verbosity normal - working-directory: ${{ env.working-directory }} - - - name: Test - run: dotnet test -c Release --no-build --verbosity normal - working-directory: ${{ env.working-directory }} - - - name: Publish to Nuget - run: dotnet nuget push ${{ env.release-directory }}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate - working-directory: ${{ env.working-directory }} - - - name: Publish to Nuget symbols - run: dotnet nuget push ${{ env.release-directory }}/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate - working-directory: ${{ env.working-directory }} diff --git a/Sources/Kysect.PowerShellRunner.Tests/Kysect.PowerShellRunner.Tests.csproj b/Sources/Kysect.PowerShellRunner.Tests/Kysect.PowerShellRunner.Tests.csproj index 6b81620..434638c 100644 --- a/Sources/Kysect.PowerShellRunner.Tests/Kysect.PowerShellRunner.Tests.csproj +++ b/Sources/Kysect.PowerShellRunner.Tests/Kysect.PowerShellRunner.Tests.csproj @@ -28,10 +28,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Sources/dotnet-releaser.toml b/Sources/dotnet-releaser.toml new file mode 100644 index 0000000..0004e71 --- /dev/null +++ b/Sources/dotnet-releaser.toml @@ -0,0 +1,6 @@ +# configuration file for dotnet-releaser +[msbuild] +project = "Kysect.PowerShellRunner.sln" +[github] +user = "kysect" +repo = "PowerShellRunner"