diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml index 524ad71..7074c59 100644 --- a/.github/workflows/gem-push.yml +++ b/.github/workflows/gem-push.yml @@ -3,8 +3,6 @@ name: Ruby Gem on: push: branches: [ "master" ] - pull_request: - branches: [ "master" ] jobs: build: @@ -15,12 +13,20 @@ jobs: packages: write steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release + with: + release-type: ruby + package-name: contrived_math + bump-minor-pre-major: true + version-file: "lib/flat_api/version.rb" - uses: actions/checkout@v3 + if: ${{ steps.release.outputs.release_created }} - name: Set up Ruby 3.3 uses: ruby/setup-ruby@v1 with: ruby-version: 3.3 - + if: ${{ steps.release.outputs.release_created }} - name: Publish to GPR run: | mkdir -p $HOME/.gem @@ -32,7 +38,7 @@ jobs: env: GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" OWNER: ${{ github.repository_owner }} - + if: ${{ steps.release.outputs.release_created }} - name: Publish to RubyGems run: | mkdir -p $HOME/.gem @@ -43,3 +49,4 @@ jobs: gem push *.gem env: GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" + if: ${{ steps.release.outputs.release_created }}