File tree Expand file tree Collapse file tree 2 files changed +34
-5
lines changed
Expand file tree Collapse file tree 2 files changed +34
-5
lines changed Original file line number Diff line number Diff line change 2323 outputs :
2424 upload_url : ${{ steps.release.outputs.upload_url }}
2525 steps :
26+ - name : Parse Changelog # Exits if changelog not found
27+ id : changelog
28+ env :
29+ INPUT_VERSION : ${{ needs.check.outputs.version }}
30+ run : node ./scripts/changelog
2631 - name : Tag and Release
2732 uses : avakar/tag-and-release@v1
2833 with :
4651 uses : actions/checkout@v2
4752 with :
4853 ref : ${{ needs.check.outputs.commit }}
49- - name : Parse Changelog # Exits if changelog not found
50- id : changelog
51- env :
52- INPUT_VERSION : ${{ needs.check.outputs.version }}
53- run : node ./scripts/changelog
5454 - name : Set up Node.js
5555 uses : actions/setup-node@v1
5656 with :
Original file line number Diff line number Diff line change 1+ /* eslint-env node */
2+ const os = require ( 'os' ) ;
3+
4+ exports . getInput = ( key = '' ) => {
5+ const val = process . env [ `INPUT_${ key . replace ( ' ' , '_' ) . toUpperCase ( ) } ` ] || '' ;
6+
7+ return val ;
8+ } ;
9+
10+ exports . setOutput = ( key = '' , value = '' ) => {
11+ process . stdout . write ( `::set-output${ key ? ` name=${ escape ( key ) } ` : '' } ::${ escape ( value ) } ${ os . EOL } ` ) ;
12+ } ;
13+
14+ function toSafeString ( s = '' ) {
15+ if ( ! s ) {
16+ return '' ;
17+ }
18+ if ( typeof s === 'string' || s instanceof String ) {
19+ return s ;
20+ }
21+ return JSON . stringify ( s ) ;
22+ }
23+
24+ function escape ( s = '' ) {
25+ return toSafeString ( s )
26+ . replace ( / % / g, '%25' )
27+ . replace ( / \r / g, '%0D' )
28+ . replace ( / \n / g, '%0A' ) ;
29+ }
You can’t perform that action at this time.
0 commit comments