From 41d9087fe923029fc4bf6d4230c0d4e8c329fd51 Mon Sep 17 00:00:00 2001 From: Marcelo Toledo Date: Sat, 27 Feb 2021 09:13:48 -0300 Subject: [PATCH] Test new version and new option to automatic release --- .github/workflows/publish_release.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index e85091d..a6384bb 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -11,14 +11,22 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + fetch-depth: 2 - - name: Release Gem - if: contains(github.ref, 'refs/tags/v') + - uses: marceloprado/has-changed-path@v1 + id: changed-version + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + with: + paths: lib/miga/version.rb + + - name: Tag and deploy + if: steps.changed-version.outputs.changed == 'true' uses: cadwallion/publish-rubygems-action@master env: - GITHUB_TOKEN: ${{secrets.BUNDLE_GITHUB__COM}} - RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_BUMP_RELEASE}} + GITHUB_TOKEN: "${{ secrets.BUNDLE_GITHUB__COM }}" + RUBYGEMS_API_KEY: "${{ secrets.RUBYGEMS_BUMP_RELEASE }}" RELEASE_COMMAND: | gem install bundler git config --global user.email 'marcelotoledo5000@gmail.com'