From 4e4804000251a87cac13a303bca9a9c1d772f23f Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Thu, 3 Oct 2024 15:32:06 -0400 Subject: [PATCH] Make sure pre-releases are not published with latest tag. --- .github/workflows/publish.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a0a7e5e7..0d14fdbf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,15 +23,22 @@ jobs: uses: 'euberdeveloper/ga-project-version@main' - run: npm pkg delete devDependencies scripts pnpm browserslist packageManager - name: Create Docs - if: contains(steps.vvver.outputs.version, 'pre') == false + if: ${{ !contains(steps.vvver.outputs.version, '-') }} run: npm run docs - name: Deploy Docs - if: contains(steps.vvver.outputs.version, 'pre') == false + if: ${{ !contains(steps.vvver.outputs.version, '-') }} uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_site publish_branch: docs - - run: npm publish --access public --provenance + - name: Publish full release + run: npm publish --access public --provenance + if: ${{ !contains(steps.vvver.outputs.version, '-') }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish pre-release + run: npm publish --access public --provenance --tag pre + if: ${{ contains(steps.vvver.outputs.version, '-') }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}