Skip to content

Commit

Permalink
fix: Strip v prefix from tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jan 12, 2024
1 parent 56fbd02 commit 4e998d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.2.2

- Strip `v` from tags when checking changelogs and setting output.

# 0.2.1

- Renamed to `build-wasm-plugin`.
Expand Down
10 changes: 8 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ function detectVersion() {
const ref = process.env.GITHUB_REF;

if (ref && ref.startsWith('refs/tags/')) {
PLUGIN_VERSION = ref.replace('refs/tags/', '');
let version = ref.replace('refs/tags/', '');

core.setOutput('tag-version', PLUGIN_VERSION);
if (version.startsWith('v') || version.startsWith('V')) {
version = version.slice(1);
}

core.setOutput('tag-version', version);

PLUGIN_VERSION = version;
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonrepo/build-wasm-plugin",
"version": "0.2.1",
"version": "0.2.2",
"description": "A GitHub action to build, optimize, and prepare WASM plugins for release.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 4e998d0

Please sign in to comment.