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

Moved gem build script into release_drafter workflow #194

Merged
merged 2 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 0 additions & 18 deletions .github/build_gem.sh

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ jobs:
run: |
aws secretsmanager get-secret-value --secret-id jenkins-opensearchproject-rubygems-private-key --query SecretString --output text > gem-private_key.pem
- name: Build and package gem artifact
run: source .github/build_gem.sh
run: |
gem build opensearch-ruby.gemspec
mkdir dist && mv opensearch-ruby-*.gem dist/
tar -cvf artifacts.tar.gz dist
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion opensearch-ruby.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ['--charset=UTF-8']

signing_key = File.expand_path('gem-private_key.pem')
if $PROGRAM_NAME.end_with?('gem') && ARGV == ['build', __FILE__] && File.exist?(signing_key)
if $PROGRAM_NAME.end_with?('gem') && ARGV.first == 'build' && File.exist?(signing_key)
s.signing_key = signing_key
s.cert_chain = ['.github/opensearch-rubygems.pem']
end
Expand Down