File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 12
12
# - ci
13
13
runs-on : ubuntu-latest
14
14
steps :
15
+ - name : Debug info
16
+ run : |
17
+ cat <<EOF
18
+ Release tag name: ${{ github.event.release.tag_name }}
19
+ Release target commit-ish: ${{ github.event.release.target_commitish }}
20
+ EOF
21
+
22
+ - name : Determine NPM tag
23
+ id : npm_tag
24
+ shell : bash
25
+ run : |
26
+ case ${{ github.event.release.target_commitish }} in
27
+ develop | main | master)
28
+ if [[ ${{ github.event.release.prerelease }} == true ]]; then
29
+ npm_tag=beta
30
+ else
31
+ npm_tag=latest
32
+ fi
33
+ ;;
34
+ *)
35
+ # use the branch name
36
+ npm_tag="${{ github.event.release.target_commitish }}"
37
+ ;;
38
+ esac
39
+ echo "Determined NPM tag: [$npm_tag]"
40
+ echo "npm_tag=${npm_tag}" >> "$GITHUB_OUTPUT"
41
+ - name : Check NPM tag
42
+ run : |
43
+ if [ -z "${{ steps.npm_tag.outputs.npm_tag }}" ]; then
44
+ echo "Refusing to publish with empty NPM tag."
45
+ exit 1
46
+ fi
47
+
15
48
- name : Config GitHub user
16
49
shell : bash
17
50
run : |
You can’t perform that action at this time.
0 commit comments