Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Aug 8, 2024
1 parent 10a5315 commit 29a4c9e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/publish-npm_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ jobs:
- name: Determine NPM Tag
id: determine-npm-tag
run: |
VERSION_TAG="${{ github.event.inputs.version }}"
VERSION_TAG=${GITHUB_REF#refs/tags/v}
if [[ $VERSION_TAG == *"-"* ]]; then
echo "NPM_TAG=${VERSION_TAG#*-}" >> $GITHUB_ENV
echo ::set-output name=NPM_TAG::${VERSION_TAG#*-}
else
echo "NPM_TAG=latest" >> $GITHUB_ENV
echo ::set-output name=NPM_TAG::latest
fi
env:
GITHUB_REF: ${{ github.ref }}

- name: Publish to NPM
run: yarn publish --new-version "${{ github.event.inputs.version }}" --tag "${{ env.NPM_TAG }}" --no-git-tag-version
run: yarn publish --new-version ${GITHUB_REF#refs/tags/v} --tag ${{ steps.determine-npm-tag.outputs.NPM_TAG }} --no-git-tag-version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_REF: ${{ github.ref }}

0 comments on commit 29a4c9e

Please sign in to comment.