gempush.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Ruby Gem
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. jobs:
  7. build:
  8. name: Build + Publish
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@master
  12. - name: Set up Ruby 2.6
  13. uses: actions/setup-ruby@v1
  14. with:
  15. version: 2.6.x
  16. - name: Publish to GPR
  17. run: |
  18. mkdir -p $HOME/.gem
  19. touch $HOME/.gem/credentials
  20. chmod 0600 $HOME/.gem/credentials
  21. printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
  22. gem build *.gemspec
  23. gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
  24. env:
  25. GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
  26. OWNER: tootsuite
  27. - name: Publish to RubyGems
  28. run: |
  29. mkdir -p $HOME/.gem
  30. touch $HOME/.gem/credentials
  31. chmod 0600 $HOME/.gem/credentials
  32. printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
  33. gem build *.gemspec
  34. gem push *.gem
  35. env:
  36. GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}