This action automates the process of version release and manages build information. It supports signing commits and tags using GPG keys and integrates with GitHub CLI for pull request management.
- gpg_private_key: (required) GPG secret key for signing commits and tags.
- gpg_passphrase: (required) Passphrase for the GPG key.
- git_user_email: (required) Email for git commits.
- git_username: (required) Username for git commits.
- git_token: (required) GitHub token for accessing the GitHub API.
- version_file_path: (optional) Path to the version file. Auto-detected if not provided.
- release_branch: (required) Name of the release branch (e.g.,
main,release,deploy). - bump_script: (optional) Custom script for version bumping. Language-specific defaults are used if not provided.
- language: (optional) Project language (
rust,python,js,ts, orauto). Defaults toauto(auto-detection). - working_directory: (optional) Working directory. Defaults to
..
- release_version: The version of the release.
- pr_log: Log of pull requests.
- standard-version for versioning and release tagging (optional, action can use it automatically)
You can setup an optional script in your
package.jsonfile that triggers release and tagging:
"scripts": {
"release": "standard-version --sign --tag-prefix {tagname}"
}- A
Cargo.tomlfile with aversionfield in the[package]section - Optional: cargo-release for advanced version management (will be installed automatically if needed)
- One of the following version files:
pyproject.tomlwith[project] version = "1.2.3"setup.pywithversion="1.2.3"setup.cfgwith[metadata] version = 1.2.3__version__.pyorversion.pywith__version__ = "1.2.3"
- Optional: bump2version for advanced version management (will be installed automatically if
.bumpversion.cfgexists)
- Javascript - Full support with
package.jsonandstandard-version - TypeScript - Full support with
package.jsonandstandard-version - pnpm monorepos - Full support for JS/TS projects (React, Next.js, Solid.js, NestJS, Angular)
- Rust - Full support with
Cargo.tomlandcargo-release(or manual version bumping) - Python - Full support with
pyproject.toml,setup.py,setup.cfg, or__version__.py - Flutter
- Java
- Go
- C#
The action automatically detects your project language, but you can also specify it explicitly. The version_file_path is also auto-detected if not provided.
steps:
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"steps:
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"
language: "rust" # or "python", "js", "ts", "auto"
version_file_path: "Cargo.toml" # optional, auto-detected if not providedname: Release Workflow
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"
# version_file_path and language are auto-detectedname: Release Workflow
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"
language: "rust"
# version_file_path defaults to "Cargo.toml" if not specifiedname: Release Workflow
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"
language: "python"
# version_file_path auto-detects: pyproject.toml, setup.py, setup.cfg, or __version__.pyYou can also provide a custom bump script for any language:
steps:
- name: Release Version
uses: mitch1009/release-trigger@main
with:
gpg_private_key: ${{ secrets.GPG_SECRET }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_email: "your_email@example.com"
git_username: "your_username"
git_token: ${{ GITHUB_TOKEN }}
release_branch: "main"
language: "rust"
bump_script: "cargo release minor --execute --no-publish --no-push"Read more about software release guide here
This action is licensed under the MIT License.