From b1546cb6933bc8088ae438e1baa7d7d0cc4bdd7b Mon Sep 17 00:00:00 2001 From: m1212e <14091540+m1212e@users.noreply.github.com> Date: Mon, 18 Nov 2024 01:25:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A6=20ci:=20enable=20dev=20tag=20publi?= =?UTF-8?q?shes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_and_release.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index fcab166..962c818 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -17,7 +17,16 @@ jobs: run: bun run build env: REF_NAME: ${{ github.ref_name }} + - name: Set tag + id: tag + run: | + if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then + echo "tag=dev" >> $GITHUB_OUTPUT + elif [[ "${{ github.event.release.prerelease }}" == "false" ]]; then + echo "tag=latest" >> $GITHUB_OUTPUT + fi - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - package: ./dist/package.json \ No newline at end of file + package: ./dist/package.json + tag: ${{ steps.tag.outputs.tag }} \ No newline at end of file