File tree 1 file changed +35
-0
lines changed
1 file changed +35
-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
+
13
20
- name : Config GitHub user
14
21
shell : bash
15
22
run : |
40
47
- name : Build packages
41
48
run : npm run build
42
49
50
+ - name : Determine NPM tag
51
+ id : npm_tag
52
+ shell : bash
53
+ run : |
54
+ case ${{ github.event.release.target_commitish }} in
55
+ develop)
56
+ main)
57
+ master)
58
+ if [[ ${{ github.event.release.prerelease }} == true ]]; then
59
+ npm_tag=beta
60
+ else
61
+ npm_tag=latest
62
+ fi
63
+ ;;
64
+ *)
65
+ # use the branch name
66
+ npm_tag="${{ github.event.release.target_commitish }}"
67
+ ;;
68
+ esac
69
+ echo "Determined NPM tag: [$npm_tag]"
70
+ echo "npm_tag=${npm_tag}" >> "$GITHUB_OUTPUT"
71
+ - name : Check NPM tag
72
+ run : |
73
+ if [ -n "${{ steps.npm_tag.outputs.npm_tag }}" ]; then
74
+ echo "Refusing to publish with empty NPM tag."
75
+ exit 1
76
+ fi
77
+
43
78
# - name: Publish scratch-svg-renderer
44
79
# run: npm publish --access=public --workspace=@scratch/scratch-svg-renderer
45
80
# env:
You can’t perform that action at this time.
0 commit comments