77 description : ' Version to publish (e.g. 3.0.0-preview.4). Applied to @flexmonster/angular and to its @flexmonster/js peer.'
88 required : true
99 type : string
10+ dist_tag :
11+ description : ' npm dist-tag to publish under'
12+ required : true
13+ type : choice
14+ default : ' next'
15+ options :
16+ - latest
17+ - next
18+ - beta
1019 dry_run :
1120 description : ' Dry run (build + npm publish --dry-run, no registry write)'
1221 required : false
@@ -62,14 +71,14 @@ jobs:
6271 - name : Publish (dry-run)
6372 if : ${{ inputs.dry_run }}
6473 working-directory : dist/flexmonster/angular
65- run : npm publish --dry-run
74+ run : npm publish --tag "${{ inputs.dist_tag }}" -- dry-run
6675 env :
6776 NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6877
6978 - name : Publish
7079 if : ${{ !inputs.dry_run }}
7180 working-directory : dist/flexmonster/angular
72- run : npm publish
81+ run : npm publish --tag "${{ inputs.dist_tag }}"
7382 env :
7483 NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7584
@@ -84,11 +93,12 @@ jobs:
8493 ACTOR : ${{ github.actor }}
8594 RUN : ${{ github.run_id }}
8695 VERSION : ${{ inputs.version }}
96+ TAG : ${{ inputs.dist_tag }}
8797 DRYRUN : ${{ inputs.dry_run }}
8898 run : |
8999 ICON=$([ "$STATUS" = "success" ] && echo ":white_check_mark:" || echo ":x:")
90100 MODE=$([ "$DRYRUN" = "true" ] && echo " (dry-run)" || echo "")
91101 SHORT_SHA=${SHA:0:7}
92102 URL="https://github.com/$REPO/actions/runs/$RUN"
93103 curl -fSs -X POST -H 'Content-Type: application/json' "$SLACK_WEBHOOK_URL" \
94- -d "{\"text\":\"$ICON *publish* @flexmonster/angular@\`$VERSION\`$MODE on \`$REPO@$REF\` ($SHORT_SHA) by $ACTOR — *$STATUS*\n<$URL|View run>\"}"
104+ -d "{\"text\":\"$ICON *publish* @flexmonster/angular@\`$VERSION\` (tag: \`$TAG\`) $MODE on \`$REPO@$REF\` ($SHORT_SHA) by $ACTOR — *$STATUS*\n<$URL|View run>\"}"
0 commit comments