Big Tag and Export to Remote Scope
This task executes bit ci merge inside the workspace directory.
Important: bit-tasks/tag-export@v3|v4 requires Bit version ^1.12.45, if you need to use a lower version, use bit-tasks/tag-export@v2.
Optional The workspace directory path from the root. Default "Dir specified in Init Task or ./".
Optional Build the components before tagging.
Optional Enable strict mode for tagging.
Optional Type of increment for versioning. Available options:
major- Major version incrementpremajor- Pre-major version incrementminor- Minor version incrementpreminor- Pre-minor version incrementpatch- Patch version increment (default)prepatch- Pre-patch version incrementprerelease- Pre-release version increment
Optional Pre-release identifier (e.g., "alpha", "beta", "rc").
Optional Increment by a specific number.
This task executes bit ci merge to tag and export components. The versioning logic is based on the last merged pull request in the repository.
The task detects version keywords in the following order:
- Pull Request Labels - Version labels on the last merged PR
- Pull Request Title - Version keywords in the PR title
- Input Parameters - Fallback to the
incrementandprerelease-idinputs
You can specify version keywords using square brackets in either PR labels or PR title:
[major]- Major version increment[minor]- Minor version increment[patch]- Patch version increment (default)[pre-release:<flag>]- Pre-release version with custom identifier (e.g.,[pre-release:beta],[pre-release:alpha])
Pull Request Labels:
- Add a label named
[major]to trigger a major version bump - Add a label named
[pre-release:rc]to create a release candidate
Pull Request Title:
- "Update component with breaking changes [major]"
- "Add new feature [minor]"
- "Fix bug [patch]"
- "Release candidate [pre-release:beta]"
If no version keywords are detected in the last merged PR, the task will use the input parameters:
incrementparameter (e.g.,major,minor,patch)prerelease-idparameter for pre-release versions
Note: The task processes the last merged pull request, not the current one. Make sure to add version keywords to the PR that will be merged before this task runs.
Note: Use bit-task/init@v2 as a prior step in your action before running bit-tasks/tag-export@v4.
name: Test Bit Tag and Export
on:
pull_request:
branches:
- main
types: [closed]
permissions:
pull-requests: write # Ensure write permission for pull requests
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
BIT_CONFIG_ACCESS_TOKEN: ${{ secrets.BIT_CONFIG_ACCESS_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize Bit
uses: bit-tasks/init@v1
with:
ws-dir: "<WORKSPACE_DIR_PATH>"
- name: Bit Tag and Export
uses: bit-tasks/tag-export@v4Steps to create custom tasks in different CI/CD platforms.
Go to the GithHub action task directory and build using NCC compiler. For example;
npm install
npm run build
git commit -m "Update task"
git tag -a -m "action release" v4 --force
git push --follow-tags
For more information, refer to Create a javascript action