From a6616286ab6b4e0aeb86c698bb829a296f4507ce Mon Sep 17 00:00:00 2001 From: Ignacio Aldama Vicente Date: Tue, 18 Nov 2025 12:22:13 +0100 Subject: [PATCH 1/2] fix: remove persist option The persist option was removed as it's no longer needed for the workflow. --- action.yml | 3 --- index.ts | 3 +-- package.json | 2 +- scripts/tag-export.ts | 6 +----- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/action.yml b/action.yml index fae8987..11f68b3 100644 --- a/action.yml +++ b/action.yml @@ -7,9 +7,6 @@ inputs: ws-dir: description: "Workspace json file directory path" required: false - persist: - description: "Persist soft tagged components" - required: false build: description: "Build the components" required: false diff --git a/index.ts b/index.ts index ba7e5fe..26d3cc2 100644 --- a/index.ts +++ b/index.ts @@ -4,7 +4,6 @@ import run from "./scripts/tag-export"; try { const githubToken = process.env.GITHUB_TOKEN; const wsDir: string = core.getInput("ws-dir") || process.env.WSDIR || "./"; - const persist: boolean = core.getInput("persist") === "true" ? true : false; const build: boolean = core.getInput("build") === "true" ? true : false; const increment: string = core.getInput("increment"); const prereleaseId: string = core.getInput("prerelease-id"); @@ -15,7 +14,7 @@ try { throw new Error("GitHub token not found"); } - run(githubToken, wsDir, persist, build, increment, prereleaseId, incrementBy, strict); + run(githubToken, wsDir, build, increment, prereleaseId, incrementBy, strict); } catch (error) { core.setFailed((error as Error).message); } diff --git a/package.json b/package.json index fb83017..d3d1fbe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bit-tasks/tag-export", - "version": "4.0.0", + "version": "4.0.1", "description": "", "main": "dist/index.js", "scripts": { diff --git a/scripts/tag-export.ts b/scripts/tag-export.ts index 2092dfc..e89b010 100644 --- a/scripts/tag-export.ts +++ b/scripts/tag-export.ts @@ -75,7 +75,7 @@ function getOverridenVersions(labels?: any[]): string[] { }); } -const run = async (githubToken: string, wsdir: string, persist: boolean, build: boolean, increment: string, prereleaseId: string, incrementBy: number, strict: boolean) => { +const run = async (githubToken: string, wsdir: string, build: boolean, increment: string, prereleaseId: string, incrementBy: number, strict: boolean) => { const version = await getExecOutput("bit -v", [], { cwd: wsdir }); // If the version is lower than 1.12.45, throw an error recommending to downgrade the action version to v2 @@ -136,10 +136,6 @@ const run = async (githubToken: string, wsdir: string, persist: boolean, build: } } - if (persist) { - mergeArgs.push("--persist"); - } - // Get overridden versions as an array const overridenComponentVersions = getOverridenVersions(lastMergedPR?.labels); core.info("Overriden labels: " + overridenComponentVersions.join(", ")); From 774dc43310a5034db71d43939966010f23287b83 Mon Sep 17 00:00:00 2001 From: Ignacio Aldama Vicente Date: Tue, 18 Nov 2025 12:29:39 +0100 Subject: [PATCH 2/2] docs: update readme with latest version info and formatting - Update version requirements and references from v3 to v4 - Remove deprecated 'persist' option from inputs --- README.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9f42ded..a83c844 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # Bit Tag and Export for CI/CD Pipelines + Big Tag and Export to Remote Scope # GitHub Actions This task executes `bit ci merge` inside the workspace directory. -*Important*: `bit-tasks/tag-export@v3` requires Bit version `^1.12.45`, if you need to use a lower version, use `bit-tasks/tag-export@v2`. +_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`. ## Inputs @@ -13,10 +14,6 @@ This task executes `bit ci merge` inside the workspace directory. **Optional** The workspace directory path from the root. Default `"Dir specified in Init Task or ./"`. -### `persist` - -**Optional** Persist soft tagged components by adding `--persist` flag. - ### `build` **Optional** Build the components before tagging. @@ -28,6 +25,7 @@ This task executes `bit ci merge` inside the workspace directory. ### `increment` **Optional** Type of increment for versioning. Available options: + - `major` - Major version increment - `premajor` - Pre-major version increment - `minor` - Minor version increment @@ -61,17 +59,19 @@ The task detects version keywords in the following order: You can specify version keywords using square brackets in either PR labels or PR title: - `[major]` - Major version increment -- `[minor]` - Minor version increment +- `[minor]` - Minor version increment - `[patch]` - Patch version increment (default) - `[pre-release:]` - Pre-release version with custom identifier (e.g., `[pre-release:beta]`, `[pre-release:alpha]`) ### Examples **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]" @@ -80,6 +80,7 @@ You can specify version keywords using square brackets in either PR labels or PR ### Fallback Behavior If no version keywords are detected in the last merged PR, the task will use the input parameters: + - `increment` parameter (e.g., `major`, `minor`, `patch`) - `prerelease-id` parameter for pre-release versions @@ -87,17 +88,17 @@ If no version keywords are detected in the last merged PR, the task will use the ## Example usage -**Note:** Use `bit-task/init@v2` as a prior step in your action before running `bit-tasks/tag-export@v2`. +**Note:** Use `bit-task/init@v2` as a prior step in your action before running `bit-tasks/tag-export@v4`. ```yaml name: Test Bit Tag and Export on: pull_request: - branches: + branches: - main types: [closed] permissions: - pull-requests: write # Ensure write permission for pull requests + pull-requests: write # Ensure write permission for pull requests jobs: release: runs-on: ubuntu-latest @@ -113,11 +114,9 @@ jobs: - name: Initialize Bit uses: bit-tasks/init@v1 with: - ws-dir: '' + ws-dir: "" - name: Bit Tag and Export - uses: bit-tasks/tag-export@v3 - with: - persist: 'false' # Set to 'true' if you use the soft tag flow + uses: bit-tasks/tag-export@v4 ``` # Contributor Guide @@ -132,7 +131,7 @@ Go to the GithHub action task directory and build using NCC compiler. For exampl npm install npm run build git commit -m "Update task" -git tag -a -m "action release" v2 --force +git tag -a -m "action release" v4 --force git push --follow-tags ```