diff --git a/.github/workflows/release-hotfix.yml b/.github/workflows/release-hotfix.yml deleted file mode 100644 index b38d39959..000000000 --- a/.github/workflows/release-hotfix.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow creates a release pull request whenever a change is pushed to 'main'. -# When the release pull request is merged into 'main', it will automatically create and tag a new -# release version. - -name: Release automation from 'hotfix' branch -on: - push: - branches: [hotfix/2.3.4] -jobs: - release-please: - name: Create a new release - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v4 - id: release - with: - token: ${{ secrets.GH_TOKEN }} - default-branch: "hotfix/2.3.4" - release-type: ruby - package-name: nla-blacklight - bump-minor-pre-major: true - bump-patch-for-minor-pre-major: true - include-v-in-tag: false - changelog-types: >- - [ - {"type":"feat","section":"Features","hidden":false}, - {"type":"fix","section":"Bug Fixes","hidden":false}, - {"type":"perf","section":"Performance Improvements","hidden":false}, - {"type":"revert","section":"Reverts","hidden":false}, - {"type":"docs","section":"Documentation","hidden":false}, - {"type":"style","section":"Styles","hidden":false}, - {"type":"chore","section":"Miscellaneous","hidden":false}, - {"type":"refactor","section":"Code Refactoring","hidden":false}, - {"type":"test","section":"Tests","hidden":false}, - {"type":"build","section":"Build System","hidden":false}, - {"type":"ci","section":"Continuous Integration","hidden":false} - ] - version-file: "config/application.rb" diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml deleted file mode 100644 index 202983c27..000000000 --- a/.github/workflows/release-main.yml +++ /dev/null @@ -1,37 +0,0 @@ -# This workflow creates a release pull request whenever a change is pushed to 'main'. -# When the release pull request is merged into 'main', it will automatically create and tag a new -# release version. - -name: Release automation from 'main' branch -on: - push: - branches: [main] -jobs: - release-please: - name: Create a new release - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v4 - id: release - with: - token: ${{ secrets.GH_TOKEN }} - release-type: ruby - package-name: nla-blacklight - bump-minor-pre-major: true - bump-patch-for-minor-pre-major: true - include-v-in-tag: false - changelog-types: >- - [ - {"type":"feat","section":"Features","hidden":false}, - {"type":"fix","section":"Bug Fixes","hidden":false}, - {"type":"perf","section":"Performance Improvements","hidden":false}, - {"type":"revert","section":"Reverts","hidden":false}, - {"type":"docs","section":"Documentation","hidden":false}, - {"type":"style","section":"Styles","hidden":false}, - {"type":"chore","section":"Miscellaneous","hidden":false}, - {"type":"refactor","section":"Code Refactoring","hidden":false}, - {"type":"test","section":"Tests","hidden":false}, - {"type":"build","section":"Build System","hidden":false}, - {"type":"ci","section":"Continuous Integration","hidden":false} - ] - version-file: "config/application.rb" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..a63aae853 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +# This workflow creates a release pull request whenever a change is pushed to 'main'. +# When the release pull request is merged into 'main', it will automatically create and tag a new +# release version. + +name: Release automation +on: + push: + branches: ["dependabot/github_actions/google-github-actions/release-please-action-4"] +jobs: + release-please: + permissions: + contents: write + pull-requests: write + name: Create a new release + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release diff --git a/.github/workflows/verify-upgrade.yml b/.github/workflows/verify-upgrade.yml deleted file mode 100644 index d7afa6aee..000000000 --- a/.github/workflows/verify-upgrade.yml +++ /dev/null @@ -1,88 +0,0 @@ -# This workflow runs the unit and system tests, as well as static code analysis -# and dependecy vulnerability checks. -# -# It uses the default MySQL database included in the runner (usually ubuntu-latest). -name: "Tests and code quality" -on: - push: - branches: - - "feat/upgrade" - pull_request: - branches: - - "feat/upgrade" -jobs: - linters: - concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-lint - cancel-in-progress: true - name: Linters - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: RuboCop - run: | - bundle exec rubocop --parallel - - - name: Brakeman code scanning - run: | - bundle exec brakeman --format github --no-pager --no-exit-on-warn - - - name: Bundler Audit check - run: | - bundle exec bundle audit check --update - - tests: - concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-test - cancel-in-progress: true - name: Tests - runs-on: ubuntu-latest - env: - CI: true - DB_DATABASE: blacklight_test - DB_USER: root - DB_PASSWORD: root - RAILS_ENV: test - DATABASE_URL: "mysql2://root:root@localhost:3306/blacklight_test" - PATRONS_DB_URL: "mysql2://root:root@localhost:3306/blacklight_test" - REDIS_URL: redis://localhost:6379/0 - services: - redis: - image: redis:alpine - ports: - - 6379:6379 - options: --entrypoint redis-server - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Ruby - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true - - - name: Set up MySQL - run: | - pwd - sudo /etc/init.d/mysql start - mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} - - - name: RSpec tests - uses: coactions/setup-xvfb@v1.0.1 - with: - run: | - bundle exec rspec - - - name: Simplecov Report - uses: aki77/simplecov-report-action@v1 - with: - failedThreshold: 80 - token: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.actor != 'dependabot[bot]' }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..95a37e3ee --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "3.2.0" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..746b3825f --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,70 @@ +{ + "release-type": "ruby", + "packages": { + ".": { + "release-type": "ruby", + "package-name": "shelfie", + "bump-minor-pre-major": false, + "bump-patch-for-minor-pre-major": false, + "include-v-in-tag": false, + "version-file": "config/application.rb", + "changelog-sections": [ + { + "type": "feat", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "perf", + "section": "Performance Improvements", + "hidden": false + }, + { + "type": "revert", + "section": "Reverts", + "hidden": false + }, + { + "type": "docs", + "section": "Documentation", + "hidden": false + }, + { + "type": "style", + "section": "Styles", + "hidden": false + }, + { + "type": "chore", + "section": "Miscellaneous", + "hidden": false + }, + { + "type": "refactor", + "section": "Code Refactoring", + "hidden": false + }, + { + "type": "test", + "section": "Tests", + "hidden": false + }, + { + "type": "build", + "section": "Build System", + "hidden": false + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": false + } + ] + } + } +}