File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : publish
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ setup :
9+ name : Set Up Environment
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+ - uses : ruby/setup-ruby@v1
14+ with :
15+ bundler-cache : true
16+ - run : bundle install
17+
18+ publish-ghp :
19+ needs : [setup]
20+ name : Publish Gem
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Publish
24+ shell : bash
25+ run : |
26+ set +x
27+ mkdir -p ~/.gem
28+ cat << EOF > ~/.gem/credentials
29+ ---
30+ :github: Bearer ${{ GITHUB_TOKEN }}
31+ :rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
32+ EOF
33+
34+ chmod 0600 ~/.gem/credentials
35+ set -x
36+
37+ bundle exec gem build *.gemspec
38+ bundle exec gem push --key github --host "https://rubygems.pkg.github.com/chtzvt"
39+ bundle exec gem push --key rubygems_api_key --host "https://rubygems.org"
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
1313
1414 spec . metadata [ "homepage_uri" ] = spec . homepage
1515 spec . metadata [ "source_code_uri" ] = "https://github.com/chtzvt/sssecrets"
16+ spec . metadata [ "github_repo" ] = "ssh://github.com/chtzvt/sssecrets"
1617
1718 # Specify which files should be added to the gem when it is released.
1819 # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
You can’t perform that action at this time.
0 commit comments