Skip to content

[deps]: Update typescript to v5.3.2 (#385) #70

[deps]: Update typescript to v5.3.2 (#385)

[deps]: Update typescript to v5.3.2 (#385) #70

Workflow file for this run

name: Publish Ruby SDK
on:
push:
branches:
- master
jobs:
generate_schemas:
uses: ./.github/workflows/generate_schemas.yml
build_rust:
uses: ./.github/workflows/build-rust-cross-platform.yml
build_ruby:
name: Build Ruby
runs-on: ubuntu-22.04
needs:
- generate_schemas
- build_rust
steps:
- name: Checkout Repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Set up Ruby
uses: ruby/setup-ruby@54a18e26dbbb1eabc604f317ade9a5788dddef81 # v1.159.0
with:
ruby-version: 3.2
- name: Download Ruby schemas artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: schemas.rb
path: languages/ruby/bitwarden_sdk/lib
- name: Download x86_64-apple-darwin files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libbitwarden_c_files-x86_64-apple-darwin
path: temp/macos-x64
- name: Download aarch64-apple-darwin files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libbitwarden_c_files-aarch64-apple-darwin
path: temp/macos-arm64
- name: Download x86_64-unknown-linux-gnu files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libbitwarden_c_files-x86_64-unknown-linux-gnu
path: temp/ubuntu-x64
- name: Download x86_64-pc-windows-msvc files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: libbitwarden_c_files-x86_64-pc-windows-msvc
path: temp/windows-x64
- name: Copy lib files
run: |
mkdir -p languages/ruby/bitwarden_sdk/lib/macos-arm64
mkdir -p languages/ruby/bitwarden_sdk/lib/ubuntu-x64
mkdir -p languages/ruby/bitwarden_sdk/lib/macos-x64
mkdir -p languages/ruby/bitwarden_sdk/lib/windows-x64
platforms=("macos-arm64" "ubuntu-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/lib/${platforms[$i]}/${files[$i]}"
done
shell: bash
- name: Build gem
run: gem build bitwarden-sdk.gemspec
working-directory: languages/ruby/bitwarden_sdk
- name: Push gem to Rubygems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push *.gem
env:
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
working-directory: languages/ruby/bitwarden_sdk