diff --git a/.github/actions/setup-rubygems/action.yml b/.github/actions/setup-rubygems/action.yml new file mode 100644 index 0000000..5c43c2a --- /dev/null +++ b/.github/actions/setup-rubygems/action.yml @@ -0,0 +1,18 @@ +name: Setup RubyGems +description: Setup RubyGems credentials +inputs: + api-key: + description: RubyGems API key + required: true +runs: + using: composite + steps: + - name: setup rubygems + shell: bash + run: | + mkdir -p ~/.gem + cat <<-YAML > ~/.gem/credentials + --- + :rubygems_api_key: ${{ inputs.rubygems_api_key }} + YAML + chmod 0600 ~/.gem/credentials diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index 92e902c..ddb9248 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -21,11 +21,10 @@ jobs: strategy: matrix: ruby-version: - - "2.7" - - "3.1" - "3.2" + - "3.3" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} @@ -38,11 +37,11 @@ jobs: - test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2" - - uses: kickstarter/actions/setup-rubygems@main + ruby-version: "3.3" + - uses: ./.github/actions/setup-rubygems@main with: api-key: ${{ secrets.RUBYGEMS_API_KEY }} - run: bundle install