|
16 | 16 | outputs:
|
17 | 17 | tag_name: ${{ steps.tag.outputs.name }} # The full name of the tag, e.g. v2.32.0.vfs.0.0
|
18 | 18 | tag_version: ${{ steps.tag.outputs.version }} # The version number (without preceding "v"), e.g. 2.32.0.vfs.0.0
|
| 19 | + deb_signable: ${{ steps.deb.outputs.signable }} # Whether the credentials needed to sign the .deb package are available |
19 | 20 | steps:
|
20 | 21 | - name: Validate tag
|
21 | 22 | run: |
|
|
29 | 30 | echo "name=${GITHUB_REF#refs/tags/}" >>$GITHUB_OUTPUT
|
30 | 31 | echo "version=${GITHUB_REF#refs/tags/v}" >>$GITHUB_OUTPUT
|
31 | 32 | id: tag
|
| 33 | + - name: Determine whether signing certificates are present |
| 34 | + run: echo "signable=$([[ $AZ_SUB != '' && $AZ_CREDS != '' ]] && echo 'true' || echo 'false')" >>$GITHUB_OUTPUT |
| 35 | + id: deb |
32 | 36 | - name: Clone git
|
33 | 37 | uses: actions/checkout@v3
|
34 | 38 | - name: Validate the tag identified with trigger
|
@@ -571,7 +575,7 @@ jobs:
|
571 | 575 | path: git/.github/macos-installer/*.dmg
|
572 | 576 | # End build and sign Mac OSX installers
|
573 | 577 |
|
574 |
| - # Build unsigned Ubuntu package |
| 578 | + # Build & sign Ubuntu package |
575 | 579 | ubuntu_build:
|
576 | 580 | runs-on: ubuntu-20.04
|
577 | 581 | needs: prereqs
|
@@ -647,4 +651,45 @@ jobs:
|
647 | 651 | with:
|
648 | 652 | name: deb-package-unsigned
|
649 | 653 | path: artifacts/
|
650 |
| - # End build unsigned Ubuntu package |
| 654 | + ubuntu_sign-artifacts: |
| 655 | + runs-on: windows-latest # Must be run on Windows due to ESRP executable OS compatibility |
| 656 | + environment: release |
| 657 | + needs: [ubuntu_build, prereqs] |
| 658 | + if: needs.prereqs.outputs.deb_signable == 'true' |
| 659 | + env: |
| 660 | + ARTIFACTS_DIR: artifacts |
| 661 | + steps: |
| 662 | + - name: Clone repository |
| 663 | + uses: actions/checkout@v3 |
| 664 | + with: |
| 665 | + path: 'git' |
| 666 | + - name: Download unsigned packages |
| 667 | + uses: actions/download-artifact@v3 |
| 668 | + with: |
| 669 | + name: deb-package-unsigned |
| 670 | + path: unsigned |
| 671 | + - uses: azure/login@v1 |
| 672 | + with: |
| 673 | + creds: ${{ secrets.AZURE_CREDENTIALS }} |
| 674 | + - name: Set up ESRP client |
| 675 | + shell: pwsh |
| 676 | + env: |
| 677 | + AZURE_VAULT: ${{ secrets.AZURE_VAULT }} |
| 678 | + AUTH_CERT: ${{ secrets.AZURE_VAULT_AUTH_CERT_NAME }} |
| 679 | + REQUEST_SIGNING_CERT: ${{ secrets.AZURE_VAULT_REQUEST_SIGNING_CERT_NAME }} |
| 680 | + run: | |
| 681 | + git\.github\scripts\set-up-esrp.ps1 |
| 682 | + - name: Sign package |
| 683 | + shell: pwsh |
| 684 | + env: |
| 685 | + AZURE_AAD_ID: ${{ secrets.AZURE_AAD_ID }} |
| 686 | + LINUX_KEY_CODE: ${{ secrets.LINUX_KEY_CODE }} |
| 687 | + LINUX_OP_CODE: ${{ secrets.LINUX_OPERATION_CODE }} |
| 688 | + run: | |
| 689 | + python git\.github\scripts\run-esrp-signing.py unsigned $env:LINUX_KEY_CODE $env:LINUX_OP_CODE |
| 690 | + - name: Upload signed artifact |
| 691 | + uses: actions/upload-artifact@v3 |
| 692 | + with: |
| 693 | + name: deb-package-signed |
| 694 | + path: signed |
| 695 | + # End build & sign Ubuntu package |
0 commit comments