Skip to content

Commit

Permalink
chore: stylish fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kobezzza committed May 6, 2024
1 parent d5be81d commit b721d71
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@ jobs:
with:
result-encoding: string
script: |
const { version } = require('${{ github.workspace }}/package.json');
const {version} = require('${{ github.workspace }}/package.json');
const semver = require('semver');
const DEFAULT_TAG = 'latest';
const parsedVersion = semver.parse(version);
if (parsedVersion == null) {
return DEFAULT_TAG;
}
const { prerelease } = parsedVersion;
const {prerelease} = parsedVersion;
if (prerelease.length === 0) {
return DEFAULT_TAG;
}
const tag = prerelease[0];
return typeof tag === 'string' ? tag : DEFAULT_TAG;
Expand Down

0 comments on commit b721d71

Please sign in to comment.