Skip to content

Commit

Permalink
DC-3240: Fixing get ruby gem api key from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
hung-nguyen-hoang committed Mar 12, 2024
1 parent 492192c commit 6e4a92b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ jobs:
restore-keys: ${{ runner.os }}-m2
- name: Run gem release
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
echo ${SAMPLE_KEY:0:3}
echo ${GEM_HOST_API_KEY:0:20}
bundle exec rake gem:release
env:
SAMPLE_KEY: "a1234567"
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
rubygems-release:
runs-on: ubuntu-latest
steps:
Expand All @@ -40,10 +42,12 @@ jobs:
bundler-cache: true
- name: Run gem release
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
echo ${SAMPLE_KEY:0:3}
echo ${GEM_HOST_API_KEY:0:20}
bundle exec rake gem:release
env:
SAMPLE_KEY: "a1234567"
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
gem-smoke-test:
runs-on: ubuntu-latest
needs: [jruby-gem-release, rubygems-release]
Expand Down

0 comments on commit 6e4a92b

Please sign in to comment.