Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align line lengths and quotes in documentation #156

Merged
merged 3 commits into from
Sep 5, 2024
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ With [GitHub Actions](https://github.com/features/actions), you can create custo
software development lifecycle directly in your GitHub repository. These workflows consist of
different tasks, called actions, that can be executed automatically when certain events occur.

At Syde, we use GitHub Actions for a wide range of tasks. From various quality assurance tests
(e.g. static analysis checks, PHPUnit tests, etc.), to asset (pre)compilation
At Syde, we use GitHub Actions for a wide range of tasks. From various quality assurance tests (
e.g., static analysis checks, PHPUnit tests, etc.), to asset (pre)compilation
with [Composer Asset Compiler](https://github.com/inpsyde/composer-asset-compiler), release
generation, deployments (CI/CD), and container registry management: all automatable, recurring tasks
are performed in GitHub Actions.
Expand Down
30 changes: 16 additions & 14 deletions docs/archive-creation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Create plugin archive

This action can be used to create plugin archives in a controlled and isolated environment via GitHub Actions.
This action can be used to create plugin archives in a controlled and isolated environment via
GitHub Actions.

To achieve that, the reusable workflow:

Expand All @@ -11,7 +12,8 @@ To achieve that, the reusable workflow:
5. Executes Rector if configured by the package
6. Re-installs dependencies without dev-dependencies
7. Sets current commit hash and plugin version in the plugin's main file
8. Runs `wp dist-archive` to create the final archive (with builtin support for a `.distignore` file)
8. Runs `wp dist-archive` to create the final archive (with builtin support for a `.distignore`
file)
9. Uploads it as an artifact for download or further processing

## Simple usage example
Expand Down Expand Up @@ -45,24 +47,24 @@ jobs:
|-----------------------|---------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| `NODE_OPTIONS` | `''` | Space-separated list of command-line Node options |
| `NODE_VERSION` | `18` | Node version with which the assets will be compiled |
| `NPM_REGISTRY_DOMAIN` | `"https://npm.pkg.github.com/"` | Domain of the private npm registry |
| `PACKAGE_MANAGER` | `"yarn"` | Package manager with which the dependencies should be installed (`npm` or `yarn`) |
| `COMPOSER_ARGS` | `'--no-dev --no-scripts --prefer-dist --optimize-autoloader'` | Set of arguments passed to Composer when gathering production dependencies |
| `PHP_VERSION` | `"8.0"` | PHP version to use when gathering production dependencies |
| `PHP_VERSION_BUILD` | `"8.0"` | PHP version to use when executing build tools |
| `ARCHIVE_NAME` | `""` | The name of the zip archive (falls back to the repository name) |
| `PLUGIN_MAIN_FILE` | `"index.php"` | The name of the main plugin file |
| `PLUGIN_FOLDER_NAME` | `""` | The name of the plugin folder (falls back to the archive name, if set, or the repository name) |
| `NPM_REGISTRY_DOMAIN` | `'https://npm.pkg.github.com/'` | Domain of the private npm registry |
| `PACKAGE_MANAGER` | `'yarn'` | Package manager with which the dependencies should be installed (`npm` or `yarn`) |
| `COMPOSER_ARGS` | `'--no-dev --no-scripts --prefer-dist --optimize-autoloader'` | Set of arguments passed to Composer when gathering production dependencies |
| `PHP_VERSION` | `'8.0'` | PHP version to use when gathering production dependencies |
| `PHP_VERSION_BUILD` | `'8.0'` | PHP version to use when executing build tools |
| `ARCHIVE_NAME` | `''` | The name of the zip archive (falls back to the repository name) |
| `PLUGIN_MAIN_FILE` | `'index.php'` | The name of the main plugin file |
| `PLUGIN_FOLDER_NAME` | `''` | The name of the plugin folder (falls back to the archive name, if set, or the repository name) |
| `PLUGIN_VERSION` | - | The new plugin version |
| `PRE_SCRIPT` | `""` | Run custom shell code before creating the release archive |
| `PRE_SCRIPT` | `''` | Run custom shell code before creating the release archive |
| `COMPILE_ASSETS_ARGS` | `'-v --env=root'` | Set of arguments passed to Composer Asset Compiler |

#### A note on `PLUGIN_VERSION`

The workflow will accept any arbitrary string and will use it without validation or sanitization.
Adding this would mean reduced flexibility at increased complexity. Adding standardization/validation
is encouraged but should take place in the controlling workflow, where the conventions and requirements
of the project/team/client are known.
Adding this would mean reduced flexibility at increased complexity. Adding
standardization/validation is encouraged but should take place in the controlling workflow, where
the conventions and requirements of the project/team/client are known.

## Secrets

Expand Down
21 changes: 11 additions & 10 deletions docs/assets-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

This workflow utilizes
the [Composer Asset Compiler](https://github.com/inpsyde/composer-asset-compiler) to compile assets.
For details, refer to [Pre-compilation](https://github.com/inpsyde/composer-asset-compiler#pre-compilation).
For details, refer
to [Pre-compilation](https://github.com/inpsyde/composer-asset-compiler#pre-compilation).

**Simplest possible example:**

Expand All @@ -20,15 +21,15 @@ jobs:

### Inputs

| Name | Default | Description |
|-----------------------|-------------------------------|-----------------------------------------------------------------------------------|
| `NODE_OPTIONS` | `''` | Space-separated list of command-line Node options |
| `NODE_VERSION` | `18` | Node version with which the assets will be compiled |
| `NPM_REGISTRY_DOMAIN` | `https://npm.pkg.github.com/` | Domain of the private npm registry |
| `PACKAGE_MANAGER` | `yarn` | Package manager with which the dependencies should be installed (`npm` or `yarn`) |
| `PHP_VERSION` | `"8.0"` | PHP version with which the assets compilation is to be executed |
| `COMPOSER_ARGS` | `'--prefer-dist'` | Set of arguments passed to Composer |
| `COMPILE_ASSETS_ARGS` | `'-v --env=root'` | Set of arguments passed to Composer Asset Compiler |
| Name | Default | Description |
|-----------------------|---------------------------------|-----------------------------------------------------------------------------------|
| `NODE_OPTIONS` | `''` | Space-separated list of command-line Node options |
| `NODE_VERSION` | `18` | Node version with which the assets will be compiled |
| `NPM_REGISTRY_DOMAIN` | `'https://npm.pkg.github.com/'` | Domain of the private npm registry |
| `PACKAGE_MANAGER` | `'yarn'` | Package manager with which the dependencies should be installed (`npm` or `yarn`) |
| `PHP_VERSION` | `'8.0'` | PHP version with which the assets compilation is to be executed |
| `COMPOSER_ARGS` | `'--prefer-dist'` | Set of arguments passed to Composer |
| `COMPILE_ASSETS_ARGS` | `'-v --env=root'` | Set of arguments passed to Composer Asset Compiler |

### Secrets

Expand Down
23 changes: 12 additions & 11 deletions docs/automatic-release.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# Automatic release

This workflow utilizes [semantic-release](https://github.com/semantic-release/semantic-release) to create a package
release.
Note that you must stick to
their [commit message convention](https://github.com/semantic-release/semantic-release#commit-message-format) to use it.
This workflow utilizes [semantic-release](https://github.com/semantic-release/semantic-release) to
create a package release. Note that you must stick to
their [commit message convention](https://github.com/semantic-release/semantic-release#commit-message-format)
to use it.

You can provide a `release.config.js` file in your repository to create a custom release that uses the following
semantic-release plugins:
You can provide a `release.config.js` file in your repository to create a custom release that uses
the following semantic-release plugins:

- [git](https://github.com/semantic-release/git)
- [npm](https://github.com/semantic-release/npm)
- [exec](https://github.com/semantic-release/exec)

Otherwise, the workflow will create the release with a [standard set of configurations](../templates/automatic-release/release.config.js), updating the version in the
following files:
Otherwise, the workflow will create the release with
a [standard set of configurations](../templates/automatic-release/release.config.js), updating the
version in the following files:

- `CHANGELOG.md`
- `composer.json`
- `package-lock.json`
- `package.json`
- `style.css` or the main plugin file (automatically discovered by the workflow)

By default, every push to the `main` and `next` branches will release a stable version, and every push to the `alpha`
and `beta` branches will create a pre-release version.
If you want to use a different configuration, please provide your custom `release.config.js` file.
By default, every push to the `main` and `next` branches will release a stable version, and every
push to the `alpha` and `beta` branches will create a pre-release version. If you want to use a
different configuration, please provide your custom `release.config.js` file.

**Simplest possible example:**

Expand Down
Loading