Skip to content

Commit

Permalink
Merge pull request #1961 from hung-nguyen-hoang/DC-3240
Browse files Browse the repository at this point in the history
DC-3240: Fixing failed update license file during release gem

Reviewed-by: https://github.com/danh-ung
  • Loading branch information
gdgate authored Mar 11, 2024
2 parents f52ae9c + 0895c8e commit 492192c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run gem release
run: bundle exec rake gem:release
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
bundle exec rake gem:release
rubygems-release:
runs-on: ubuntu-latest
steps:
Expand All @@ -37,9 +39,11 @@ jobs:
ruby-version: 3.2.1
bundler-cache: true
- name: Run gem release
run: bundle exec rake gem:release
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
bundle exec rake gem:release
gem-smoke-test:
runs-on: ubuntu-latest
needs: [jruby-gem-release, rubygems-release]
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace :gem do
File.delete(origin_license_file) if File.exist?(origin_license_file)
File.delete(notices_file) if File.exist?(notices_file)
puts "Deleted files: #{origin_license_file} and #{notices_file}"
File.rename(new_license_file, origin_license_file) if File.exists?(new_license_file)
File.rename(new_license_file, origin_license_file) if File.exist?(new_license_file)
puts "Renamed file #{new_license_file} to #{origin_license_file}"
puts "Building #{gem} ..."
res = `gem build ./gooddata.gemspec`
Expand Down

0 comments on commit 492192c

Please sign in to comment.