diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 04d87fc..8cb675f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -5,22 +5,8 @@ on: workflows: [CI] types: [completed] branches: [main] + jobs: - deploy: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'schedule' }} - steps: - - uses: actions/checkout@v3 - - name: Tag and Push Gem - id: tag-and-push-gem - uses: discourse/publish-rubygems-action@v2 - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - GIT_EMAIL: ${{secrets.GUSTO_GIT_EMAIL}} - GIT_NAME: ${{secrets.GUSTO_GIT_NAME}} - RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} - - name: Create GitHub Release - run: gh release create v${{steps.tag-and-push-gem.outputs.gem_version}} --generate-notes - if: ${{ steps.tag-and-push-gem.outputs.new_version == 'true' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/cd.yml@main + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7336f00..bf361de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,72 +1,7 @@ name: CI -on: - push: - branches: - - main - pull_request: - schedule: - - cron: "0 0 * * *" +on: [push, pull_request] jobs: - minitest: - runs-on: ubuntu-latest - strategy: - matrix: - ruby: - - 2.7 - # See comment comes from https://github.com/ruby/setup-ruby#matrix-of-ruby-versions - # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - - "3.0" - - 3.1 - - 3.2 - env: - BUNDLE_GEMFILE: Gemfile - name: "Minitest tests: Ruby ${{ matrix.ruby }}" - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby ${{ matrix.ruby }} - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: ${{ matrix.ruby }} - - name: Run tests - run: bundle exec rake - static_type_check: - name: "Type Check" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: 3.1 - - name: Run static type checks - run: bundle exec srb tc - rubocop: - runs-on: ubuntu-latest - name: Rubocop - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - ruby-version: 3.1 - - name: Run style checks - run: bundle exec rubocop - notify_on_failure: - runs-on: ubuntu-latest - needs: [minitest, static_type_check, rubocop] - if: ${{ failure() && github.ref == 'refs/heads/main' }} - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - steps: - - uses: slackapi/slack-github-action@v1.25.0 - with: - payload: | - { - "text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - } + call-workflow-from-shared-config: + uses: rubyatscale/shared-config/.github/workflows/ci.yml@main \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 2e0781a..11e640b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,7 +17,7 @@ GIT PATH remote: . specs: - packwerk-extensions (0.1.10) + packwerk-extensions (0.1.11) packwerk (>= 2.2.1) railties (>= 6.0.0) sorbet-runtime diff --git a/packwerk-extensions.gemspec b/packwerk-extensions.gemspec index e6027d3..eba08ed 100644 --- a/packwerk-extensions.gemspec +++ b/packwerk-extensions.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = 'packwerk-extensions' - spec.version = '0.1.10' + spec.version = '0.1.11' spec.authors = ['Gusto Engineers'] spec.email = ['dev@gusto.com']