docs: expand YYYY/Docs/ to 9 standard documents #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| packages: read | |
| env: | |
| DOTNET_VERSION: '10.0.x' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ── Read version — skip CI for .dev versions ────────────────────────── | |
| # .dev versions reference local packages (e.g. PayrollEngine.Client.Scripting | |
| # 0.10.0-beta.dev) that are not published to GitHub Packages. | |
| - name: Read version | |
| id: version | |
| working-directory: 'YYYY' | |
| run: | | |
| VERSION=$(grep -oP '(?<=<Version>)[^<]+' Directory.Build.props) | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "Version: ${VERSION}" | |
| if [[ "${VERSION}" == *".dev"* ]]; then | |
| echo "is_dev=true" >> $GITHUB_OUTPUT | |
| echo "⏭️ Development version — skipping CI build" | |
| else | |
| echo "is_dev=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Setup .NET | |
| if: steps.version.outputs.is_dev != 'true' | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Configure GitHub Packages | |
| if: steps.version.outputs.is_dev != 'true' | |
| run: | | |
| # Remove local dev source (not available in CI) | |
| dotnet nuget remove source PayrollEngine 2>/dev/null || true | |
| dotnet nuget add source \ | |
| "https://nuget.pkg.github.com/Payroll-Engine/index.json" \ | |
| --name github \ | |
| --username github-actions \ | |
| --password ${{ secrets.GITHUB_TOKEN }} \ | |
| --store-password-in-clear-text | |
| - name: Restore | |
| if: steps.version.outputs.is_dev != 'true' | |
| working-directory: 'YYYY' | |
| run: dotnet restore | |
| - name: Build | |
| if: steps.version.outputs.is_dev != 'true' | |
| working-directory: 'YYYY' | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Pack | |
| if: steps.version.outputs.is_dev != 'true' | |
| working-directory: 'YYYY' | |
| run: dotnet pack --configuration Release --no-build --output ./nupkgs | |
| - name: List packages | |
| if: steps.version.outputs.is_dev != 'true' | |
| working-directory: 'YYYY' | |
| run: ls -la ./nupkgs/ |