Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.14 KB

automatic-release.md

File metadata and controls

65 lines (52 loc) · 2.14 KB

Automatic release

This workflow utilizes semantic-release to create a package release. Note that you must stick to their commit message convention 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:

Otherwise, the workflow will create the release with a standard set of configurations, 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.

Simplest possible example:

name: Release
on:
  push:
    branches:
      - main
      - beta
      - alpha
jobs:
  release:
    uses: inpsyde/reusable-workflows/.github/workflows/automatic-release.yml@main

Configuration parameters

Secrets

Name Required Default Description
GITHUB_USER_TOKEN false '' Authentication token with write permission needed by the release bot (falls back to GITHUB_TOKEN)

Example with configuration parameters:

name: Release
on:
  push:
    branches:
      - main
      - alpha
jobs:
  release:
    uses: inpsyde/reusable-workflows/.github/workflows/automatic-release.yml@main
    secrets:
      GITHUB_USER_TOKEN: ${{ secrets.WRITE_TOKEN }}