@@ -11,17 +11,42 @@ jobs:
1111 node-version : ' 12.x'
1212 - run : |
1313 npm ci
14- mkdir dist
1514 npm run build
16- cp package.json dist
17- cp action.yml dist
18- cp README.md dist
19- - run : |
20- git checkout --orphan build_branch
2115 git config user.email "ros-tooling@users.noreply.github.com"
2216 git config user.name "ROS Tooling [bot]"
23- git add --force dist
24- git commit --no-verify -m "$commitmsg" --only dist
25- git push origin --no-verify HEAD:refs/tags/build/${{github.sha}}
17+ - name : Upload build as orphan ref
18+ run : |
19+ git checkout --orphan build_branch
20+ git add --force dist/index.js action.yml package.json README.md
21+ git commit --no-verify -m "$commitmsg"
22+ git push origin --no-verify HEAD:refs/tags/staging1/${{github.sha}}
2623 env :
2724 commitmsg : " Autobuild\n\n GitHub-Workflow: ${{ github.workflow }}"
25+ - name : Upload build as artifact
26+ uses : actions/upload-artifact@v2
27+ with :
28+ name : build
29+ path : |
30+ dist/index.js
31+ action.yml
32+ package.json
33+ README.md
34+ - name : Upload build as release
35+ uses : actions/create-release@v1
36+ id : release
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ with :
40+ tag_name : ${{ github.ref }}
41+ release_name : autobuild for ${{github.sha}}
42+ draft : true
43+ - name : npm pack
44+ id : npm-pack
45+ run : echo ::set-output name=file::$(npm pack)
46+ - name : Upload Release Assets
47+ uses : actions/upload-release-asset@v1
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ with :
51+ upload_url : ${{ steps.release.outputs.upload_url }}
52+ asset_path : ${{ steps.npm-pack.outputs.file }}
0 commit comments