Skip to content

Commit

Permalink
chore: fix npm suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Aug 22, 2024
1 parent 4d6684b commit f5d6f65
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
result-encoding: string
script: |
const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name;
const firstMinusIndex = fullTag.indexOf('-');
if (firstMinusIndex !== -1) {
return fullTag.substring(firstMinusIndex);
if (fullTag.includes('-')) {
const [, fullSuffix] = fullTag.split('-');
const [suffix] = fullSuffix.split('.');
return suffix;
} else {
return '';
}
Expand All @@ -57,6 +58,11 @@ jobs:
const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/);
return (tag.includes('-') ? `${major}.${minor}${{steps.suffix.outputs.result}}` : 'latest');
- name: Show NPM release tag
run: |
echo "NPM suffix: ${{ steps.suffix.outputs.result }}"
echo "NPM release tag: ${{ steps.tag.outputs.result }}"
- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down

0 comments on commit f5d6f65

Please sign in to comment.