@@ -15,12 +15,16 @@ jobs:
1515 outputs :
1616 tag_name : ${{ steps.tag.outputs.name }} # The full name of the tag, e.g. v2.32.0.vfs.0.0
1717 tag_version : ${{ steps.tag.outputs.version }} # The version number (without preceding "v"), e.g. 2.32.0.vfs.0.0
18+ deb_signable : ${{ steps.deb.outputs.signable }} # Whether the credentials needed to sign the .deb package are available
1819 steps :
1920 - name : Determine tag to build
2021 run : |
2122 echo "::set-output name=name::${GITHUB_REF#refs/tags/}"
2223 echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
2324 id : tag
25+ - name : Determine whether signing certificates are present
26+ run : echo "::set-output name=signable::$([[ $AZ_SUB != '' && $AZ_CREDS != '' ]] && echo 'true' || echo 'false')"
27+ id : deb
2428 - name : Clone git
2529 uses : actions/checkout@v2
2630 - name : Validate the tag identified with trigger
@@ -559,7 +563,7 @@ jobs:
559563 path : git/.github/macos-installer/*.dmg
560564 # End build and sign Mac OSX installers
561565
562- # Build unsigned Ubuntu package
566+ # Build & sign Ubuntu package
563567 ubuntu_build :
564568 runs-on : ubuntu-18.04
565569 needs : prereqs
@@ -635,4 +639,44 @@ jobs:
635639 with :
636640 name : deb-package-unsigned
637641 path : artifacts/
638- # End build unsigned Ubuntu package
642+ ubuntu_sign-artifacts :
643+ runs-on : windows-latest # Must be run on Windows due to ESRP executable OS compatibility
644+ needs : [ubuntu_build, prereqs]
645+ if : needs.prereqs.outputs.deb_signable == 'true'
646+ env :
647+ ARTIFACTS_DIR : artifacts
648+ steps :
649+ - name : Clone repository
650+ uses : actions/checkout@v2
651+ with :
652+ path : ' git'
653+ - name : Download unsigned packages
654+ uses : actions/download-artifact@v2
655+ with :
656+ name : deb-package-unsigned
657+ path : unsigned
658+ - uses : azure/login@v1
659+ with :
660+ creds : ${{ secrets.AZURE_CREDENTIALS }}
661+ - name : Set up ESRP client
662+ shell : pwsh
663+ env :
664+ AZURE_VAULT : ${{ secrets.AZURE_VAULT }}
665+ AUTH_CERT : ${{ secrets.AZURE_VAULT_AUTH_CERT_NAME }}
666+ REQUEST_SIGNING_CERT : ${{ secrets.AZURE_VAULT_REQUEST_SIGNING_CERT_NAME }}
667+ run : |
668+ git\.github\scripts\set-up-esrp.ps1
669+ - name : Sign package
670+ shell : pwsh
671+ env :
672+ AZURE_AAD_ID : ${{ secrets.AZURE_AAD_ID }}
673+ LINUX_KEY_CODE : ${{ secrets.LINUX_KEY_CODE }}
674+ LINUX_OP_CODE : ${{ secrets.LINUX_OPERATION_CODE }}
675+ run : |
676+ python git\.github\scripts\run-esrp-signing.py unsigned $env:LINUX_KEY_CODE $env:LINUX_OP_CODE
677+ - name : Upload signed artifact
678+ uses : actions/upload-artifact@v2
679+ with :
680+ name : deb-package-signed
681+ path : signed
682+ # End build & sign Ubuntu package
0 commit comments