From dd2a4e40d0832bd3e92c04bbaf997c7f91faa268 Mon Sep 17 00:00:00 2001 From: Callin Mullaney <57088-callinmullaney@users.noreply.drupalcode.org> Date: Tue, 11 Aug 2026 14:19:49 -0500 Subject: [PATCH] ci: prepare manual 1.1.1 release --- .github/scripts/generation-smoke.sh | 5 +- .github/workflows/dev-sync.yml | 28 ---------- .github/workflows/generation-smoke.yml | 75 ++++++++++++++++++++++++++ README.md | 22 ++++---- 4 files changed, 91 insertions(+), 39 deletions(-) delete mode 100644 .github/workflows/dev-sync.yml create mode 100644 .github/workflows/generation-smoke.yml diff --git a/.github/scripts/generation-smoke.sh b/.github/scripts/generation-smoke.sh index b4a9b49..5956e57 100755 --- a/.github/scripts/generation-smoke.sh +++ b/.github/scripts/generation-smoke.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# shellcheck disable=SC2016 set -euo pipefail @@ -155,8 +156,8 @@ vendor/bin/drush site:install minimal \ --account-pass=admin \ -y -log "Enabling Emulsify Tools and the Emulsify parent theme" -vendor/bin/drush pm:enable emulsify_tools -y +log "Enabling Emulsify Tools, Components, and the Emulsify parent theme" +vendor/bin/drush pm:enable components emulsify_tools -y vendor/bin/drush theme:enable emulsify -y vendor/bin/drush cr -y diff --git a/.github/workflows/dev-sync.yml b/.github/workflows/dev-sync.yml deleted file mode 100644 index 7d07a8f..0000000 --- a/.github/workflows/dev-sync.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Sync Drupal Dev Branch -on: - push: - branches: - - '*.x' -jobs: - sync: - name: Sync Dev Branch - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Add remote SSH Key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.DRUPAL_ORG_SSH_KEY }} - config: ${{ secrets.SSH_CONFIG }} - known_hosts: ${{ secrets.KNOWN_HOSTS }} - - name: Sync dev branch to Drupal.org Project - run: | - git remote add drupal-org '${{ secrets.DRUPAL_REPO_URL }}' - git push drupal-org ${{ steps.extract_branch.outputs.branch }} diff --git a/.github/workflows/generation-smoke.yml b/.github/workflows/generation-smoke.yml new file mode 100644 index 0000000..e71e4e1 --- /dev/null +++ b/.github/workflows/generation-smoke.yml @@ -0,0 +1,75 @@ +name: Generation Smoke + +on: + pull_request: + branches: + - "1.1.x" + push: + branches: + - "1.1.x" + +permissions: + contents: read + +jobs: + generation-smoke: + name: Real Drupal generation (Drupal ${{ matrix.drupal-label }} / PHP ${{ matrix.php-version }}) + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + include: + - php-version: "8.3" + drupal-project-version: "10.3.*" + drupal-label: "10.3" + - php-version: "8.3" + drupal-project-version: "11.3.*" + drupal-label: "11.3" + env: + COMPOSER_NO_INTERACTION: "1" + DRUPAL_VERSION: ${{ matrix.drupal-project-version }} + DRUSH_VERSION: "^13" + EMULSIFY_VERSION: "^6" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate generation script + run: | + bash -n .github/scripts/generation-smoke.sh + shellcheck .github/scripts/generation-smoke.sh + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: pdo_sqlite + coverage: none + + - name: Locate Composer cache + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" + + - name: Cache Composer downloads + uses: actions/cache@v4 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: generation-composer-${{ runner.os }}-php${{ matrix.php-version }}-${{ matrix.drupal-label }}-${{ hashFiles('composer.json', '.github/scripts/generation-smoke.sh') }} + restore-keys: | + generation-composer-${{ runner.os }}-php${{ matrix.php-version }}- + generation-composer-${{ runner.os }}- + + - name: Run real Drupal generation smoke test + run: | + set -o pipefail + bash .github/scripts/generation-smoke.sh 2>&1 | tee "$RUNNER_TEMP/generation-smoke.log" + + - name: Upload generation smoke log + if: failure() + uses: actions/upload-artifact@v4 + with: + name: generation-smoke-drupal-${{ matrix.drupal-label }}-php-${{ matrix.php-version }} + path: ${{ runner.temp }}/generation-smoke.log + if-no-files-found: warn + retention-days: 7 diff --git a/README.md b/README.md index 1b5c206..4f60aae 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ KEEP_FIXTURE=1 ### Committing Changes -To facilitate automatic semantic release versioning, we utilize the [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) standard through Commitizen. Follow these steps when commiting your work to ensure a better tomorrow. +We utilize the [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) standard through Commitizen. Follow these steps when committing your work to ensure useful release notes. 1. Stage your changes, ensuring they encompass exactly what you wish to change, no more. 2. Run `yarn commit` and follow the prompts to craft the perfect commit message. @@ -148,21 +148,25 @@ To facilitate automatic semantic release versioning, we utilize the [Conventiona --- -There's a two-step process to publish a new release to [the project page](https://www.drupal.org/project/emulsify_tools) on Drupal.org. +Emulsify Tools 1.x releases are published manually. This keeps GitHub and Drupal.org publication as separate, deliberate actions. -1. Cut a release on GitHub -2. Select the generated tag for the release on Drupal.org, and set it as the "recommended" release. +1. Merge the release-ready changes into `1.1.x` and confirm the Generation Smoke workflow passes. +2. Create and push a numeric release tag, such as `1.1.1`, to GitHub. +3. Create the matching GitHub release. +4. Push the `1.1.x` branch and release tag to Drupal.org. +5. Create the release on Drupal.org and set it as the supported, recommended release. ### Creating a release on GitHub -- Once one or more PRs are merged into the development branch, [create a "Release" PR](https://github.com/emulsify-ds/emulsify_tools/compare/main...feature-branch) to merge the latest from that branch into `main`. -- As soon as that PR is merged, a [GitHub action](https://github.com/emulsify-ds/emulsify_tools/actions) will kick off to cut a release based on the commit messages in that release. - - _Note: This workflow will also push the new tag to drupal.org so that you can select it in the next section._ -- When that is finished, you should see the new release listed on the [Releases page](https://github.com/emulsify-ds/emulsify_tools/releases) for the repository. +- Fetch the latest `1.1.x` branch and create an annotated numeric tag from it. +- Push only that tag to GitHub. +- Create a GitHub release from the tag and include the relevant release notes. +- Verify the release on the [GitHub Releases page](https://github.com/emulsify-ds/emulsify_tools/releases). ### Publishing the release to Drupal.org -- Go to the [Releases tab for the Emulsify Twig project](https://www.drupal.org/node/3094752/edit/releases) on drupal.org. (You'll need to be a maintainer to access this page.) +- Manually push the `1.1.x` branch and matching numeric tag to the Drupal.org Git remote. +- Go to the [Releases tab for Emulsify Tools](https://www.drupal.org/node/3094752/edit/releases) on Drupal.org. (You'll need to be a maintainer to access this page.) - Click "Add new release" - Select the tag for the latest release and click Next - Copy the release notes from the GitHub releases page, and reformat them according to the wysiwyg options