Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/scripts/generation-smoke.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# shellcheck disable=SC2016

set -euo pipefail

Expand Down Expand Up @@ -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

Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/dev-sync.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/generation-smoke.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Loading