diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index d1290ff..beecf64 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,6 +5,8 @@ on: push: tags: - 'v*.*.*' + - 'v*.*.*-beta*' + jobs: publish-npm: runs-on: ubuntu-latest @@ -16,7 +18,13 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm version --no-git-tag-version ${GITHUB_REF##*/} - - run: npm run publish-package + - name: Publish package + run: | + if [[ ${{ github.ref }} == *-beta* ]]; then + npm publish --tag beta + else + npm publish + fi env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - name: Build Changelog @@ -34,4 +42,4 @@ jobs: release_name: Release ${{ github.ref }} body: ${{steps.github_release.outputs.changelog}} draft: false - prerelease: false + prerelease: ${{ contains(github.ref, '-beta') }}