-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BRE-224] Create a GitHub release workflows for sdk (#1078)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> https://bitwarden.atlassian.net/browse/BRE-224 ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> Create and/or split workflow to create a GitHub Release for SDK parts. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --------- Co-authored-by: Vince Grassia <[email protected]>
- Loading branch information
1 parent
2868f26
commit a6fd484
Showing
18 changed files
with
1,128 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
name: Build Ruby | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build Ruby | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@52753b7da854d5c07df37391a986c76ab4615999 # v1.191.0 | ||
with: | ||
ruby-version: 3.2 | ||
|
||
- name: Download artifacts | ||
uses: bitwarden/gh-actions/download-artifacts@main | ||
with: | ||
workflow: generate_schemas.yml | ||
path: languages/ruby/bitwarden_sdk_secrets/lib | ||
workflow_conclusion: success | ||
branch: ${{ github.ref_name }} | ||
artifacts: schemas.rb | ||
|
||
- name: Download x86_64-apple-darwin artifact | ||
uses: bitwarden/gh-actions/download-artifacts@main | ||
with: | ||
workflow: build-rust-cross-platform.yml | ||
path: temp/macos-x64 | ||
workflow_conclusion: success | ||
branch: ${{ github.ref_name }} | ||
artifacts: libbitwarden_c_files-x86_64-apple-darwin | ||
|
||
- name: Download aarch64-apple-darwin artifact | ||
uses: bitwarden/gh-actions/download-artifacts@main | ||
with: | ||
workflow: build-rust-cross-platform.yml | ||
workflow_conclusion: success | ||
branch: ${{ github.ref_name }} | ||
artifacts: libbitwarden_c_files-aarch64-apple-darwin | ||
path: temp/macos-arm64 | ||
|
||
- name: Download x86_64-unknown-linux-gnu artifact | ||
uses: bitwarden/gh-actions/download-artifacts@main | ||
with: | ||
workflow: build-rust-cross-platform.yml | ||
workflow_conclusion: success | ||
branch: ${{ github.ref_name }} | ||
artifacts: libbitwarden_c_files-x86_64-unknown-linux-gnu | ||
path: temp/linux-x64 | ||
|
||
- name: Download x86_64-pc-windows-msvc artifact | ||
uses: bitwarden/gh-actions/download-artifacts@main | ||
with: | ||
workflow: build-rust-cross-platform.yml | ||
workflow_conclusion: success | ||
branch: ${{ github.ref_name }} | ||
artifacts: libbitwarden_c_files-x86_64-pc-windows-msvc | ||
path: temp/windows-x64 | ||
|
||
- name: Copy lib files | ||
run: | | ||
mkdir -p languages/ruby/bitwarden_sdk_secrets/lib/macos-arm64 | ||
mkdir -p languages/ruby/bitwarden_sdk_secrets/lib/linux-x64 | ||
mkdir -p languages/ruby/bitwarden_sdk_secrets/lib/macos-x64 | ||
mkdir -p languages/ruby/bitwarden_sdk_secrets/lib/windows-x64 | ||
platforms=("macos-arm64" "linux-x64" "macos-x64" "windows-x64") | ||
files=("libbitwarden_c.dylib" "libbitwarden_c.so" "libbitwarden_c.dylib" "bitwarden_c.dll") | ||
for ((i=0; i<${#platforms[@]}; i++)); do | ||
cp "temp/${platforms[$i]}/${files[$i]}" "languages/ruby/bitwarden_sdk_secrets/lib/${platforms[$i]}/${files[$i]}" | ||
done | ||
- name: bundle install | ||
run: bundle install | ||
working-directory: languages/ruby/bitwarden_sdk_secrets | ||
|
||
- name: Build gem | ||
run: gem build bitwarden-sdk-secrets.gemspec | ||
working-directory: languages/ruby/bitwarden_sdk_secrets | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | ||
with: | ||
path: bitwarden-sdk-secrets-*.gem | ||
name: bitwarden-sdk-secrets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.