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