diff --git a/.github/workflows/publish-package.yaml b/.github/workflows/publish-package.yaml index 5f8cda0..2682e4e 100644 --- a/.github/workflows/publish-package.yaml +++ b/.github/workflows/publish-package.yaml @@ -13,6 +13,11 @@ jobs: registry-url: 'https://registry.npmjs.org' scope: '@matterlabs' - run: yarn - - run: yarn publish --tag ${{ github.event.release.tag_name }} --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }} \ No newline at end of file + - env: + NODE_AUTH_TOKEN: ${{ secrets.NPMJS_NPM_MATTERLABS_AUTOMATION_TOKEN }} + run: | + if [[ "${{ github.event.release.target_commitish }}" == "main" ]]; then + yarn publish --tag latest --access public + elif [[ "${{ github.event.release.target_commitish }}" == "beta" ]]; then + yarn publish --tag beta --access public + fi \ No newline at end of file