|
39 | 39 | publish: |
40 | 40 | name: "Publish packages" |
41 | 41 | runs-on: ubuntu-latest |
42 | | - timeout-minutes: 3 |
| 42 | + timeout-minutes: 10 |
43 | 43 |
|
44 | 44 | steps: |
45 | 45 | - name: "Checkout code" |
@@ -243,7 +243,8 @@ jobs: |
243 | 243 | with: |
244 | 244 | path: . |
245 | 245 | name: sdk-csharp-${{ inputs.version }} |
246 | | - - run: ls -la |
| 246 | + - run: | |
| 247 | + ls -la |
247 | 248 | - run: | |
248 | 249 | dotnet nuget add source \ |
249 | 250 | --username nhs-notify-supplier-api \ |
@@ -367,7 +368,9 @@ jobs: |
367 | 368 | with: |
368 | 369 | path: . |
369 | 370 | name: libs-abstractions-${{ inputs.version }} |
370 | | - - run: ls -la |
| 371 | + - run: | |
| 372 | + ls -la |
| 373 | + find . -name ".version" |
371 | 374 | - run: | |
372 | 375 | dotnet nuget add source \ |
373 | 376 | --username nhs-notify-supplier-api \ |
@@ -406,3 +409,176 @@ jobs: |
406 | 409 | env: |
407 | 410 | TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} |
408 | 411 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 412 | +
|
| 413 | +
|
| 414 | +
|
| 415 | +### PUBLISH LIBS LETTERS NUGET |
| 416 | + publishliblettersnuget: |
| 417 | + name: "Publish libs letter packages to nuget.pkg.github.com" |
| 418 | + runs-on: ubuntu-latest |
| 419 | + needs: [publish] |
| 420 | + permissions: |
| 421 | + packages: write |
| 422 | + contents: read |
| 423 | + steps: |
| 424 | + - name: "Get the artefacts" |
| 425 | + uses: actions/download-artifact@v4 |
| 426 | + with: |
| 427 | + path: . |
| 428 | + name: libs-letter-${{ inputs.version }} |
| 429 | + - run: | |
| 430 | + ls -la |
| 431 | + find . -name ".version" |
| 432 | + - run: | |
| 433 | + dotnet nuget add source \ |
| 434 | + --username nhs-notify-supplier-api \ |
| 435 | + --password ${{ secrets.GITHUB_TOKEN }} \ |
| 436 | + --store-password-in-clear-text \ |
| 437 | + --name github \ |
| 438 | + "https://nuget.pkg.github.com/NHSDigital/index.json" |
| 439 | + - run: | |
| 440 | + echo "ROOT .version file is: $(cat .version)" |
| 441 | + echo "GH variable version is: ${{ inputs.version }}" |
| 442 | + name: Showing the base versions |
| 443 | +
|
| 444 | + - run: | |
| 445 | + VERSION=${{ inputs.version }} |
| 446 | + SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" |
| 447 | + NUGET_VERSION="$(echo "$VERSION" | tr + .)" |
| 448 | + echo $VERSION |
| 449 | + echo $SHORT_VERSION |
| 450 | + echo $NUGET_VERSION |
| 451 | + SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 452 | + echo $SHORT_NUGET_VERSION |
| 453 | + SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 454 | + echo $SHORTER_NUGET_VERSION |
| 455 | + TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 456 | + TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 457 | + echo $TEST_NUGET_VERSION |
| 458 | + echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" |
| 459 | + name: Set the nuget version |
| 460 | + id: set-nuget-version |
| 461 | +
|
| 462 | + - run: | |
| 463 | + dotnet nuget push \ |
| 464 | + nhs.notify.suppliers.api.letter.${TEST_NUGET_VERSION}.nupkg \ |
| 465 | + --source github \ |
| 466 | + --api-key $GITHUB_TOKEN |
| 467 | + env: |
| 468 | + TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} |
| 469 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 470 | +
|
| 471 | +
|
| 472 | +### PUBLISH LIBS data NUGET |
| 473 | + publishlibhostnuget: |
| 474 | + name: "Publish libs host packages to nuget.pkg.github.com" |
| 475 | + runs-on: ubuntu-latest |
| 476 | + needs: [publish] |
| 477 | + permissions: |
| 478 | + packages: write |
| 479 | + contents: read |
| 480 | + steps: |
| 481 | + - name: "Get the artefacts" |
| 482 | + uses: actions/download-artifact@v4 |
| 483 | + with: |
| 484 | + path: . |
| 485 | + name: libs-host-${{ inputs.version }} |
| 486 | + - run: | |
| 487 | + ls -la |
| 488 | + find . -name ".version" |
| 489 | + - run: | |
| 490 | + dotnet nuget add source \ |
| 491 | + --username nhs-notify-supplier-api \ |
| 492 | + --password ${{ secrets.GITHUB_TOKEN }} \ |
| 493 | + --store-password-in-clear-text \ |
| 494 | + --name github \ |
| 495 | + "https://nuget.pkg.github.com/NHSDigital/index.json" |
| 496 | + - run: | |
| 497 | + echo "ROOT .version file is: $(cat .version)" |
| 498 | + echo "GH variable version is: ${{ inputs.version }}" |
| 499 | + name: Showing the base versions |
| 500 | +
|
| 501 | + - run: | |
| 502 | + VERSION=${{ inputs.version }} |
| 503 | + SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" |
| 504 | + NUGET_VERSION="$(echo "$VERSION" | tr + .)" |
| 505 | + echo $VERSION |
| 506 | + echo $SHORT_VERSION |
| 507 | + echo $NUGET_VERSION |
| 508 | + SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 509 | + echo $SHORT_NUGET_VERSION |
| 510 | + SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 511 | + echo $SHORTER_NUGET_VERSION |
| 512 | + TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 513 | + TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 514 | + echo $TEST_NUGET_VERSION |
| 515 | + echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" |
| 516 | + name: Set the nuget version |
| 517 | + id: set-nuget-version |
| 518 | +
|
| 519 | + - run: | |
| 520 | + dotnet nuget push \ |
| 521 | + nhs.notify.suppliers.api.host.${TEST_NUGET_VERSION}.nupkg \ |
| 522 | + --source github \ |
| 523 | + --api-key $GITHUB_TOKEN |
| 524 | + env: |
| 525 | + TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} |
| 526 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 527 | +
|
| 528 | +
|
| 529 | +
|
| 530 | +### PUBLISH LIBS host NUGET |
| 531 | + publishlibdatanuget: |
| 532 | + name: "Publish libs host packages to nuget.pkg.github.com" |
| 533 | + runs-on: ubuntu-latest |
| 534 | + needs: [publish] |
| 535 | + permissions: |
| 536 | + packages: write |
| 537 | + contents: read |
| 538 | + steps: |
| 539 | + - name: "Get the artefacts" |
| 540 | + uses: actions/download-artifact@v4 |
| 541 | + with: |
| 542 | + path: . |
| 543 | + name: libs-host-${{ inputs.version }} |
| 544 | + - run: | |
| 545 | + ls -la |
| 546 | + find . -name ".version" |
| 547 | + - run: | |
| 548 | + dotnet nuget add source \ |
| 549 | + --username nhs-notify-supplier-api \ |
| 550 | + --password ${{ secrets.GITHUB_TOKEN }} \ |
| 551 | + --store-password-in-clear-text \ |
| 552 | + --name github \ |
| 553 | + "https://nuget.pkg.github.com/NHSDigital/index.json" |
| 554 | + - run: | |
| 555 | + echo "ROOT .version file is: $(cat .version)" |
| 556 | + echo "GH variable version is: ${{ inputs.version }}" |
| 557 | + name: Showing the base versions |
| 558 | +
|
| 559 | + - run: | |
| 560 | + VERSION=${{ inputs.version }} |
| 561 | + SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)" |
| 562 | + NUGET_VERSION="$(echo "$VERSION" | tr + .)" |
| 563 | + echo $VERSION |
| 564 | + echo $SHORT_VERSION |
| 565 | + echo $NUGET_VERSION |
| 566 | + SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 567 | + echo $SHORT_NUGET_VERSION |
| 568 | + SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)" |
| 569 | + echo $SHORTER_NUGET_VERSION |
| 570 | + TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 571 | + TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')" |
| 572 | + echo $TEST_NUGET_VERSION |
| 573 | + echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT" |
| 574 | + name: Set the nuget version |
| 575 | + id: set-nuget-version |
| 576 | +
|
| 577 | + - run: | |
| 578 | + dotnet nuget push \ |
| 579 | + nhs.notify.suppliers.api.host.${TEST_NUGET_VERSION}.nupkg \ |
| 580 | + --source github \ |
| 581 | + --api-key $GITHUB_TOKEN |
| 582 | + env: |
| 583 | + TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }} |
| 584 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments