From 154c3fdb0a5517552cc67d16911cbdd0e1b70e34 Mon Sep 17 00:00:00 2001 From: YegorZh Date: Wed, 4 Dec 2024 02:04:29 +0000 Subject: [PATCH 1/2] fix: specified correct ruby version --- .github/workflows/CI.yaml | 4 ++-- .github/workflows/publish-gem.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d3996e6..1c6f465 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -12,10 +12,10 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 with: - ruby-version: "3.3.6" + ruby-version: "3.2.0" - name: Install dependencies - uses: gradle/gradle-build-action@v2 + uses: bundle install - name: Execute tests run: bundle exec rspec diff --git a/.github/workflows/publish-gem.yaml b/.github/workflows/publish-gem.yaml index 032afcc..526f9c2 100644 --- a/.github/workflows/publish-gem.yaml +++ b/.github/workflows/publish-gem.yaml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 with: - ruby-version: "3.3.6" + ruby-version: "3.2.0" - name: Install dependencies uses: bundle install From 90929877b6df143ca889ddcca4f398af258db9bd Mon Sep 17 00:00:00 2001 From: YegorZh Date: Wed, 4 Dec 2024 02:06:04 +0000 Subject: [PATCH 2/2] fix: correct branch name --- .github/workflows/CI.yaml | 11 +++++++---- .github/workflows/publish-gem.yaml | 27 --------------------------- 2 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/publish-gem.yaml diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 1c6f465..64f1013 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -1,9 +1,9 @@ name: CI on: - push: pull_request: + push: branches: - - master + - main jobs: unit-openapi-ruby-sdk: @@ -12,13 +12,16 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 with: - ruby-version: "3.2.0" + ruby-version: "3.1" - name: Install dependencies - uses: bundle install + run: bundle install - name: Execute tests run: bundle exec rspec + env: + UNIT_TOKEN: ${{ secrets.UNIT_TOKEN }} + TEST_PLAID_TOKEN: ${{ secrets.TEST_PLAID_TOKEN }} - name: Execute Rake build run: bundle exec rake build diff --git a/.github/workflows/publish-gem.yaml b/.github/workflows/publish-gem.yaml deleted file mode 100644 index 526f9c2..0000000 --- a/.github/workflows/publish-gem.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish gem to RubyOrgs -on: - release: - types: [created] -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 - with: - ruby-version: "3.2.0" - - - name: Install dependencies - uses: bundle install - - - name: Execute Rake build - run: bundle exec rake build - - - name: Publish to RubyGems - run: | - touch $HOME/pkg/credentials - chmod 0600 $HOME/pkg/credentials - printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/pkg/credentials - gem push ./pkg/*.gem - env: - GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"