13 group: ${{ github.workflow }}-${{ github.ref }}
14 cancel-in-progress: true
18 name: Release package on NPM
19 runs-on: ubuntu-latest
20 if: github.event.workflow_run.conclusion == 'success' && startsWith(github.ref_name, 'v')
23 uses: actions/checkout@v4
27 - name: Determine if version is prerelease
31 if printf "%s\n" "${{ github.ref_name }}" | grep -q -P '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$'; then
37 printf 'value=%s\n' "$_prerelease" >> "$GITHUB_OUTPUT"
39 # TODO(carlocorradini) Changelog
42 uses: softprops/action-gh-release@v1
44 prerelease: ${{ steps.prerelease.outputs.value == 'true' }}