This workflow will publish a release corresponding to the given tag.
You can use this workflow using the following Github Actions configuration.
The only requirement is the presence of the glpi-project/tools in the composer (dev) dependencies of the plugin.
This workflow will require the contents: "write" permission to be able to create a release.
name: "Publish release"
on:
push:
tags:
- '*'
jobs:
publish-release:
permissions:
contents: "write"
name: "Publish release"
uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"
with:
# The name of the tag.
# Default: "${{ github.ref_name }}"
tag: ""
# The name of the release.
# Default: "${{ github.ref_name }}"
release-name: ""
# The release description.
# If the repository contains a `CHANGELOG.md` file, the default description will contain a link to this file,
# otherwise, the description will be empty.
release-body: ""By default, the release is created using the workflow GITHUB_TOKEN. To use another token, see Authentication.
jobs:
publish-release:
permissions:
contents: "write"
uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"
with:
bot-client-id: "${{ vars.GLPI_PROJECT_BOT_CLIENT_ID }}"
secrets:
bot-private-key: "${{ secrets.GLPI_PROJECT_BOT_PRIVATE_KEY }}"This workflow can be used to automatically create a new tag when the plugin version in its setup file is updated.
name: "Automatically tag new version"
on:
push:
branches:
- "main"
paths:
- "setup.php"
jobs:
auto-tag-new-version:
name: "Automatically tag new version"
uses: "glpi-project/plugin-release-workflows/.github/workflows/auto-tag-new-version.yml@v1"
with:
bot-client-id: "${{ vars.GLPI_PROJECT_BOT_CLIENT_ID }}"
secrets:
bot-private-key: "${{ secrets.GLPI_PROJECT_BOT_PRIVATE_KEY }}"A token other than the workflow GITHUB_TOKEN is required, otherwise the tag push would not trigger other workflows. See Authentication.
Both workflows accept, in this order of precedence:
bot-tokensecret: a token (PAT or GitHub App token), used as is.bot-client-idinput andbot-private-keysecret. Used by a GitHub App with thecontents: writepermission.- The workflow
GITHUB_TOKEN(publish release workflow only).
github-token is a deprecated alias of bot-token, used when bot-token is not set.