diff --git a/.github/workflows/rubocop.yml b/.github/workflows/ci.yml similarity index 61% rename from .github/workflows/rubocop.yml rename to .github/workflows/ci.yml index e72cdfd..124d0e3 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Rubocop +name: CI on: [push, pull_request] @@ -20,20 +20,28 @@ jobs: - run: cd rubocop && bundle exec rake - deploy: + release-gem: runs-on: ubuntu-latest - environment: Deploy + permissions: + id-token: write + contents: write + + env: + PUBLISH_JOB: true + # Run on push to master branch - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + # if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - - uses: umbrellio/publish-ruby-gem-action@v1.0.4 + - run: cd rubocop + + - uses: ruby/setup-ruby@v1 with: - api-key: ${{ secrets.RUBYGEMS_API_KEY }} - working-directory: rubocop - env: - PUBLISH_JOB: true + ruby-version: ruby + bundler-cache: true + + - uses: rubygems/release-gem@v1 diff --git a/rubocop/rubocop.gemspec b/rubocop/rubocop.gemspec index b0af2f2..95c25f9 100644 --- a/rubocop/rubocop.gemspec +++ b/rubocop/rubocop.gemspec @@ -6,12 +6,8 @@ Gem::Specification.new do |spec| rubocop_version = "1.63.0" - if ENV.fetch("PUBLISH_JOB", nil) - release_version = "#{rubocop_version}.#{ENV.fetch("GITHUB_RUN_NUMBER")}" - end - spec.name = "rubocop-config-umbrellio" - spec.version = release_version || rubocop_version + spec.version = rubocop_version spec.authors = ["Umbrellio"] spec.email = ["oss@umbrellio.biz"]