-
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.
- Loading branch information
1 parent
27ec020
commit d920daf
Showing
1 changed file
with
39 additions
and
15 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 |
---|---|---|
|
@@ -107,26 +107,50 @@ jobs: | |
cp "temp/${platforms[$i]}/${files[$i]}" "languages/ruby/bitwarden_sdk_secrets/lib/${platforms[$i]}/${files[$i]}" | ||
done | ||
- name: Login to Azure | ||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0 | ||
with: | ||
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} | ||
|
||
- name: Retrieve secrets | ||
id: retrieve-secrets | ||
uses: bitwarden/gh-actions/get-keyvault-secrets@main | ||
with: | ||
keyvault: "bitwarden-ci" | ||
secrets: "rubygem-api-key" | ||
|
||
- name: bundle install | ||
run: bundle install | ||
working-directory: languages/ruby/bitwarden_sdk_secrets | ||
|
||
- name: Set remote URL | ||
- name: Push gem to Rubygems | ||
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" | ||
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: ${{ steps.retrieve-secrets.outputs.rubygem-api-key }} | ||
working-directory: languages/ruby/bitwarden_sdk_secrets | ||
|
||
- name: Configure trusted publishing credentials | ||
uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0 | ||
# - 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: Run release rake task | ||
if: ${{ inputs.release_type == 'Release' }} | ||
run: bundle exec rake release | ||
working-directory: languages/ruby/bitwarden_sdk_secrets | ||
# - name: Configure trusted publishing credentials | ||
# uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0 | ||
|
||
# - 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 | ||
|
||
- 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 |