diff --git a/.github/workflows/build_release_pipeline.yaml b/.github/workflows/build_release_pipeline.yaml index 72ef518..9fde8bd 100644 --- a/.github/workflows/build_release_pipeline.yaml +++ b/.github/workflows/build_release_pipeline.yaml @@ -1,10 +1,11 @@ name: Test, build, and release Ruby gem on: - pull_request: - branches: [ master ] push: - workflow_dispatch: + branches: [master] + workflow_dispatch: + pull_request: + branches: [master] jobs: test: @@ -14,7 +15,7 @@ jobs: matrix: ruby: [ '2.7', '3.0', '3.1' ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: @@ -31,11 +32,10 @@ jobs: needs: test if: success() && github.ref == 'refs/heads/master' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.7' bundler-cache: true - name: Setup run: | @@ -45,7 +45,7 @@ jobs: id: build run: | bundle exec rake build - echo "::set-output name=gem_version::v$(bundle exec rake version)" + run: echo "GEM_VERSION=v$(bundle exec rake version)" >> $GITHUB_ENV - name: Release if: success() && github.ref == 'refs/heads/master' @@ -67,6 +67,6 @@ jobs: github.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: "refs/tags/${{ steps.build.outputs.gem_version }}", + ref: "refs/tags/${{ env.GEM_VERSION }}", sha: context.sha })