|
| 1 | +name: release-please |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + release-please: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - id: release |
| 13 | + uses: google-github-actions/release-please-action@v2.28.0 |
| 14 | + with: |
| 15 | + command: manifest |
| 16 | + config-file: ".github/release-please-config.json" |
| 17 | + manifest-file: ".github/.release-please-manifest.json" |
| 18 | + |
| 19 | + # The following steps only run when release was created |
| 20 | + - name: Checkout code if release was created |
| 21 | + if: ${{ steps.release.outputs.release_created }} |
| 22 | + uses: actions/checkout@v2 |
| 23 | + |
| 24 | + - name: Setup Ruby |
| 25 | + if: ${{ steps.release.outputs.release_created }} |
| 26 | + uses: ruby/setup-ruby@v1 |
| 27 | + with: |
| 28 | + ruby-version: 2.7 |
| 29 | + bundler-cache: true |
| 30 | + |
| 31 | + - name: Build gems |
| 32 | + if: ${{ steps.release.outputs.release_created }} |
| 33 | + run: gem build */*.gemspec |
| 34 | + |
| 35 | +# - name: Publish to GPR |
| 36 | +# if: ${{ steps.release.outputs.release_created }} |
| 37 | +# run: | |
| 38 | +# mkdir -p $HOME/.gem |
| 39 | +# touch $HOME/.gem/credentials |
| 40 | +# chmod 0600 $HOME/.gem/credentials |
| 41 | +# printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials |
| 42 | +# gem build *.gemspec |
| 43 | +# gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem |
| 44 | +# env: |
| 45 | +# GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" |
| 46 | +# OWNER: ${{ github.repository_owner }} |
| 47 | +# |
| 48 | +# - name: Publish to RubyGems |
| 49 | +# if: ${{ steps.release.outputs.release_created }} |
| 50 | +# run: | |
| 51 | +# mkdir -p $HOME/.gem |
| 52 | +# touch $HOME/.gem/credentials |
| 53 | +# chmod 0600 $HOME/.gem/credentials |
| 54 | +# printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials |
| 55 | +# gem build *.gemspec |
| 56 | +# gem push *.gem |
| 57 | +# env: |
| 58 | +# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" |
0 commit comments