Skip to content

Commit

Permalink
Add publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
mimartin12 committed Sep 26, 2023
1 parent 8c14356 commit 335c867
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions .github/workflows/build-swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -113,4 +113,44 @@ jobs:
-headers ./Headers \
-library ${{ github.workspace }}/universal-ios-sim/release/libbitwarden_uniffi.a \
-headers ./Headers \
-output ./BitwardenFFI.xcframework
-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 }}

0 comments on commit 335c867

Please sign in to comment.