@@ -14,36 +14,42 @@ jobs:
1414 - run : npm install
1515 - run : npm test
1616 - uses : codecov/codecov-action@v1
17- - if : startsWith(github.ref, 'refs/tags/')
18- run : git log $(git tag | tail -n2 | head -1)..HEAD --pretty=oneline --graph --abbrev-commit --no-decorate > release-changelog.md
19- - if : startsWith(github.ref, 'refs/tags/')
20- id : release
17+ strategy :
18+ matrix :
19+ node :
20+ - lts/dubnium
21+ - node
22+ release :
23+ if : startsWith(github.ref, 'refs/tags/')
24+ name : release
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v2
28+ - uses : dcodeIO/setup-node-nvm@master
29+ with :
30+ node-version : node
31+ - run : npm install
32+ - run : npm test
33+ - uses : codecov/codecov-action@v1
34+ - id : release
2135 uses : actions/create-release@v1
2236 env :
2337 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2438 with :
2539 tag_name : ${{ github.ref }}
26- body_path : release-changelog.md
27- - if : startsWith(github.ref, 'refs/tags/')
28- uses : actions/upload-release-asset@v1
40+ - uses : actions/upload-release-asset@v1
2941 env :
3042 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3143 with :
32- upload_url : ${{ steps.create_release .outputs.upload_url }}
44+ upload_url : ${{ steps.release .outputs.upload_url }}
3345 asset_path : mdast-util-assert.js
3446 asset_name : mdast-util-assert.js
3547 asset_content_type : application/javascript
36- - if : startsWith(github.ref, 'refs/tags/')
37- uses : actions/upload-release-asset@v1
48+ - uses : actions/upload-release-asset@v1
3849 env :
3950 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4051 with :
41- upload_url : ${{ steps.create_release .outputs.upload_url }}
52+ upload_url : ${{ steps.release .outputs.upload_url }}
4253 asset_path : mdast-util-assert.min.js
4354 asset_name : mdast-util-assert.min.js
4455 asset_content_type : application/javascript
45- strategy :
46- matrix :
47- node :
48- - lts/dubnium
49- - node
0 commit comments