diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f098e5a..a421abb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,11 @@ -name: CI / CD +name: CI on: push: branches: [main, develop] + tags: ['v*'] pull_request: branches: [main, develop] - tags: - - 'v*' env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -59,7 +58,7 @@ jobs: name: Determine Version runs-on: ubuntu-latest needs: build-and-test - if: github.event_name == 'push' || github.event_name == 'tag' + if: github.event_name == 'push' outputs: version: ${{ steps.version.outputs.version }} is_release: ${{ steps.version.outputs.is_release }} @@ -89,11 +88,13 @@ jobs: if: needs.version.outputs.is_release == 'true' strategy: matrix: + # Folder and assembly name match, so one value drives both the csproj + # path and the artifact name (artifact names cannot contain "/"). project: - - src/BeyondNetCode.Shell.Bootstrapper/BeyondNetCode.Shell.Bootstrapper.csproj - - src/BeyondNetCode.Shell.Bootstrapper.DependencyInjection/BeyondNetCode.Shell.Bootstrapper.DependencyInjection.csproj - - src/BeyondNetCode.Shell.Bootstrapper.AutoMapper/BeyondNetCode.Shell.Bootstrapper.AutoMapper.csproj - - src/BeyondNetCode.Shell.Bootstrapper.Observability/BeyondNetCode.Shell.Bootstrapper.Observability.csproj + - BeyondNetCode.Shell.Bootstrapper + - BeyondNetCode.Shell.Bootstrapper.DependencyInjection + - BeyondNetCode.Shell.Bootstrapper.AutoMapper + - BeyondNetCode.Shell.Bootstrapper.Observability steps: - uses: actions/checkout@v4 @@ -104,10 +105,9 @@ jobs: - name: Pack run: | - dotnet pack "${{ matrix.project }}" \ + dotnet pack "${{ matrix.project }}/${{ matrix.project }}.csproj" \ -c Release \ - --version:${{ needs.version.outputs.version }} \ - --no-build \ + -p:PackageVersion=${{ needs.version.outputs.version }} \ -p:PackageOutputPath=${{ github.workspace }}/nupkgs - name: Upload artifacts @@ -150,7 +150,7 @@ jobs: release: name: Create GitHub Release runs-on: ubuntu-latest - needs: [version] + needs: [version, publish] if: needs.version.outputs.is_release == 'true' steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index 4158135..98a923e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ NuGet - Build + Build