diff --git a/.github/workflows/gem-push.yml b/.github/workflows/gem-push.yml index 2aac1c3..9f2c0b0 100644 --- a/.github/workflows/gem-push.yml +++ b/.github/workflows/gem-push.yml @@ -24,7 +24,14 @@ jobs: with: ruby-version: 2.6 + - name: Check if version exists + id: checkversionexists + run: | + rake check_version + echo "VERSION_EXISTS=$?" >> $GITHUB_OUTPUT + - name: Publish to GPR + if: steps.checkversionexists.outputs.VERSION_EXISTS == '0' run: | mkdir -p $HOME/.gem touch $HOME/.gem/credentials @@ -36,12 +43,6 @@ jobs: GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" OWNER: ${{ github.repository_owner }} - - name: Check if version exists - id: checkversionexists - run: | - rake check_version - echo "VERSION_EXISTS=$?" >> $GITHUB_OUTPUT - - name: Publish to RubyGems if: steps.checkversionexists.outputs.VERSION_EXISTS == '0' run: |