diff --git a/.github/workflows/build-swift.yml b/.github/workflows/build-swift.yml index 9647bdafed..52bde01e44 100644 --- a/.github/workflows/build-swift.yml +++ b/.github/workflows/build-swift.yml @@ -57,7 +57,7 @@ jobs: path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.dylib if-no-files-found: error - combine: + package: runs-on: macos-13 needs: build steps: @@ -113,4 +113,44 @@ jobs: -headers ./Headers \ -library ${{ github.workspace }}/universal-ios-sim/release/libbitwarden_uniffi.a \ -headers ./Headers \ - -output ./BitwardenFFI.xcframework \ No newline at end of file + -output ./BitwardenFFI.xcframework + + - name: Upload xcframework artifact + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: BitwardenFFI.xcframework + path: ./languages/swift/BitwardenFFI.xcframework + if-no-files-found: error + + publish: + runs-on: ubuntu-22.04 + needs: package + env: + _KEY_VAULT: "bitwarden-ci" + steps: + - name: Download xcframework artifact + uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + with: + name: BitwardenFFI.xcframework + + - name: Login to Azure - Prod Subscription + uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.7 + with: + creds: ${{ secrets.AZURE_CI_SERVICE_PRINCIPAL }} + + - name: Retrieve secrets + id: retrieve-secrets + uses: bitwarden/gh-actions/get-keyvault-secrets@62d1bf7c3e31c458cc7236b1e69a475d235cd78f + with: + keyvault: ${{ env._KEY_VAULT }} + secrets: "github-pat-bitwarden-devops-bot-repo-scope" + + - name: Upload release artifact + uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0 + with: + artifacts: "BitwardenFFI.xcframework" + commit: ${{ github.sha }} + name: "BitwardenFFI" + draft: true + repo: "sdk-swift" + token: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}