Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVOPS-1785] Replace Ruby publish composite action with individual steps #627

Merged
merged 5 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-rust-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
- main
- rc
- hotfix-rc
paths:
- "crates/**"


jobs:
build_rust:
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/publish-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,27 @@ jobs:
for ((i=0; i<${#platforms[@]}; i++)); do
cp "temp/${platforms[$i]}/${files[$i]}" "languages/ruby/bitwarden_sdk_secrets/lib/${platforms[$i]}/${files[$i]}"
done
shell: bash

- name: Build gem
run: gem build bitwarden-sdk-secrets.gemspec
working-directory: languages/ruby/bitwarden_sdk_secrets

- name: Push gem to Rubygems
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
uses: rubygems/release-gem@035c7c1c1c14d277318867ced5037926d2395300 # v1.0.1
- name: Set remote URL
run: |
# Attribute commits to the last committer on HEAD
git config --global user.email "[email protected]"
git config --global user.name "bitwarden-devops-bot"
git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY"

- name: Configure trusted publishing credentials
uses: rubygems/[email protected]

- name: Run release rake task
if: ${{ inputs.release_type == 'Release' }}
run: bundle exec rake release
working-directory: languages/ruby/bitwarden_sdk_secrets

- name: Wait for release to propagate
if: ${{ inputs.release_type == 'Release' }}
run: gem exec rubygems-await pkg/*.gem
working-directory: languages/ruby/bitwarden_sdk_secrets
Loading