Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
tycooon committed Sep 13, 2024
1 parent 09e3d44 commit e7e76de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/rubocop.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rubocop
name: CI

on: [push, pull_request]

Expand All @@ -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/[email protected]
- 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
6 changes: 1 addition & 5 deletions rubocop/rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["[email protected]"]

Expand Down

0 comments on commit e7e76de

Please sign in to comment.