diff --git a/.github/workflows/main.yml b/.github/workflows/continuous_integration.yml similarity index 56% rename from .github/workflows/main.yml rename to .github/workflows/continuous_integration.yml index 40bf372..bcd2fcf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/continuous_integration.yml @@ -1,28 +1,31 @@ -name: CI Build +name: Continuous Integration on: - push: - branches: [ main ] - pull_request: - branches: [ main ] + branches: [main] + + workflow_dispatch: jobs: build: + name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }} + + if: >- + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request' && !startsWith(github.event.pull_request.head.ref, 'release-please--')) + + runs-on: ${{ matrix.operating-system }} continue-on-error: true + env: + FAIL_ON_LOW_COVERAGE: ${{ matrix.fail_on_low_coverage }} + strategy: + fail-fast: false matrix: - ruby: ['3.1', '3.4', jruby-head] + ruby: ["3.1", "3.4"] operating-system: [ubuntu-latest] - include: - - ruby: '3.1' - operating-system: windows-latest - - ruby: jruby-head - operating-system: windows-latest - - name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }} - runs-on: ${{ matrix.operating-system }} + fail_on_low_coverage: [true] steps: - name: Checkout diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 488a028..329968a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,51 +1,51 @@ --- -name: Release Gem -description: | - This workflow creates a new release on GitHub and publishes the gem to - RubyGems.org. - - The workflow uses the `googleapis/release-please-action` to handle the - release creation process and the `rubygems/release-gem` action to publish - the gem. - -on: - push: - branches: ["main"] - - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - - environment: - name: RubyGems - url: https://rubygems.org/gems/github_pages_rake_tasks - - permissions: - contents: write - pull-requests: write - id-token: write - - steps: - - name: Checkout project - uses: actions/checkout@v4 - - - name: Create release - uses: googleapis/release-please-action@v4 - id: release - with: - token: ${{ secrets.AUTO_RELEASE_TOKEN }} - config-file: release-please-config.json - manifest-file: .release-please-manifest.json - - - name: Setup ruby - uses: ruby/setup-ruby@v1 - if: ${{ steps.release.outputs.release_created }} - with: - bundler-cache: true - ruby-version: ruby - - - name: Push to RubyGems.org - uses: rubygems/release-gem@v1 - if: ${{ steps.release.outputs.release_created }} + name: Release Gem + description: | + This workflow creates a new release on GitHub and publishes the gem to + RubyGems.org. + + The workflow uses the `googleapis/release-please-action` to handle the + release creation process and the `rubygems/release-gem` action to publish + the gem. + + on: + push: + branches: ["main"] + + workflow_dispatch: + + jobs: + release: + runs-on: ubuntu-latest + + environment: + name: RubyGems + url: https://rubygems.org/gems/process_executer + + permissions: + contents: write + pull-requests: write + id-token: write + + steps: + - name: Checkout project + uses: actions/checkout@v4 + + - name: Create release + uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.AUTO_RELEASE_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + + - name: Setup ruby + uses: ruby/setup-ruby@v1 + if: ${{ steps.release.outputs.release_created }} + with: + bundler-cache: true + ruby-version: ruby + + - name: Push to RubyGems.org + uses: rubygems/release-gem@v1 + if: ${{ steps.release.outputs.release_created }}