From 6c39035aa82a01a546f18b188cacee4c8b802373 Mon Sep 17 00:00:00 2001 From: Oscar Arzola Date: Mon, 3 Jun 2024 10:27:38 -0400 Subject: [PATCH] fix: dependabot and ci updates (#79) * fix: dependabot and ci updates * chore: cleanup * Update ensure-npm-build.yml * Update create-release.yml --- .github/dependabot.yml | 44 ++++++++++++++++--- .../{autoupdate.yml => auto-update.yml} | 7 ++- .github/workflows/create-release.yml | 11 +++++ .github/workflows/ensure-npm-build.yml | 12 +++++ .release-please-manifest.json | 3 ++ README.md | 8 +--- release-please-config.json | 13 ++++++ style.css | 2 + 8 files changed, 85 insertions(+), 15 deletions(-) rename .github/workflows/{autoupdate.yml => auto-update.yml} (73%) create mode 100644 .github/workflows/create-release.yml create mode 100644 .github/workflows/ensure-npm-build.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d2edabe..51c56a8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,13 +2,47 @@ version: 2 updates: # Maintain dependencies for Composer - package-ecosystem: "composer" - # Look for `composer.json` and `composer.lock` files in the root directory directory: "/" - # Check for updates weekly schedule: interval: "weekly" allow: - # Allow direct updates only (for packages named in composer.json) - dependency-type: "direct" - # Allow up to 10 open pull requests for composer dependencies - open-pull-requests-limit: 10 + open-pull-requests-limit: 5 + versioning-strategy: "increase-if-necessary" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + groups: + composer-dependencies: + dependency-type: "production" + composer-dev-dependencies: + dependency-type: "development" + + # Maintain dependencies for npm + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + allow: + - dependency-type: "direct" + open-pull-requests-limit: 5 + versioning-strategy: "increase-if-necessary" + ignore: + - dependency-name: "*" + update-types: [ "version-update:semver-major" ] + groups: + npm-dependencies: + dependency-type: "production" + npm-dev-dependencies: + dependency-type: "development" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + all-github-actions: + patterns: + - ".*" diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/auto-update.yml similarity index 73% rename from .github/workflows/autoupdate.yml rename to .github/workflows/auto-update.yml index 1c9be41..403d80d 100644 --- a/.github/workflows/autoupdate.yml +++ b/.github/workflows/auto-update.yml @@ -1,12 +1,11 @@ -name: Run Composer Autoupdate +name: Update Bedrocks 🔧 on: push: - branches: [ dev, production ] + branches: [ dev ] jobs: trigger_bedrock_updates: - if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/production' runs-on: ubuntu-latest steps: - name: Trigger Bedrock Updates @@ -17,4 +16,4 @@ jobs: AWS_SNS_ARN_DEV: ${{ secrets.AWS_SNS_ARN_DEV }} AWS_SNS_ARN_STAGING: ${{ secrets.AWS_SNS_ARN_STAGING }} INPUT_TRIGGERED_BY: ${{ github.repository }} - INPUT_BRANCH: ${{ github.ref }} + REF: ${{ github.ref }} diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..ed54dea --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,11 @@ +name: Prepare Release 🚀 + +on: + push: + branches: + - dev + +jobs: + deploy: + uses: pressbooks/reusable-workflows/.github/workflows/prepare-release.yml@main + secrets: inherit diff --git a/.github/workflows/ensure-npm-build.yml b/.github/workflows/ensure-npm-build.yml new file mode 100644 index 0000000..1532d92 --- /dev/null +++ b/.github/workflows/ensure-npm-build.yml @@ -0,0 +1,12 @@ +name: Npm build ⚙️ + +on: + pull_request: + branches: [dev] + paths: + - "assets/**/*" + +jobs: + update-npm-build: + if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' }} + uses: pressbooks/reusable-workflows/.github/workflows/npm-build.yml@main diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..6a787c5 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.3.0" +} diff --git a/README.md b/README.md index fbeb8d0..6fd0cd4 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,5 @@ Install the [GitHub Updater plugin](https://github.com/afragen/github-updater). Then, from the GitHub Updater interface, navigate to the "Install Theme" tab. Enter [https://github.com/pressbooks/pressbooks-jacobs](https://github.com/pressbooks/pressbooks-jacobs) as the Theme URI, then click "Install Theme". Tagged updates to this theme will then be available as normal WordPress updates. -## Changelog - -### 1.2.1 - -* See: https://github.com/pressbooks/pressbooks-jacobs/releases/tag/1.2.1 -* Full release history available at: https://github.com/pressbooks/pressbooks-jacobs/releases +### Changelog +Please see the [CHANGELOG](CHANGELOG.md) file for more information. diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..eeabf24 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "simple", + "include-component-in-tag": false, + "include-v-in-tag": false, + "packages": { + ".": { + "extra-files": [ + "style.css" + ] + } + } +} \ No newline at end of file diff --git a/style.css b/style.css index d4b261e..7cfc052 100644 --- a/style.css +++ b/style.css @@ -6,7 +6,9 @@ Tags: Academic, Literary, Nonfiction, Textbook Author: Pressbooks (Book Oven Inc.) Author URI: https://pressbooks.com Copyright: 2017–2023 Pressbooks (Book Oven Inc. +x-release-please-start-version Version: 1.3.0 +x-release-please-end License: GPL v3 or later Template: pressbooks-book GitHub Theme URI: pressbooks/pressbooks-jacobs