diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fe7ed2..de2b1ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.3.1 + +- Fixed broken tag parsing. + # 0.3.0 - Updated to support monorepo based tags. diff --git a/index.ts b/index.ts index 79f076d..a724d4d 100644 --- a/index.ts +++ b/index.ts @@ -39,16 +39,13 @@ function detectVersionAndProject() { TAG = tag; // project-v1.0.0 - if (project.includes('-')) { - const lastIndex = project.lastIndexOf('-'); - - project = project.slice(0, lastIndex); - version = project.slice(lastIndex + 1); + if (tag.includes('-')) { + [project, version] = tag.split('-', 2); } // project@v1.0.0 - else if (project.includes('@')) { - [project, version] = project.split('@'); + else if (tag.includes('@')) { + [project, version] = tag.split('@', 2); } // v1.0.0 diff --git a/package.json b/package.json index 94c2ac5..c824670 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moonrepo/build-wasm-plugin", - "version": "0.2.3", + "version": "0.3.1", "description": "A GitHub action to build, optimize, and prepare WASM plugins for release.", "main": "dist/index.js", "scripts": {