|
26 | 26 | - name: Build distribution |
27 | 27 | run: yarn build |
28 | 28 | - name: Upload distribution |
29 | | - if: startsWith(github.ref, 'refs/tags/') |
| 29 | + # if: startsWith(github.ref, 'refs/tags/') |
30 | 30 | uses: actions/upload-artifact@v2 |
31 | 31 | with: |
32 | 32 | name: dist |
33 | 33 | path: dist |
| 34 | + |
| 35 | + release_draft: |
| 36 | + name: Create Draft Release |
| 37 | + needs: build |
| 38 | + runs-on: ubuntu-latest |
| 39 | + container: node:12 |
| 40 | + # if: startsWith(github.ref, 'refs/tags/') |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v2 |
| 44 | + - name: Extract tag name |
| 45 | + id: tag_name |
| 46 | + run: echo ::set-output name=TAG::${GITHUB_REF##*/} |
| 47 | + - uses: actions/download-artifact@v2 |
| 48 | + with: |
| 49 | + name: dist |
| 50 | + path: dist |
| 51 | + - name: Create zip |
| 52 | + run: | |
| 53 | + apt update && apt install zip |
| 54 | + cd dist |
| 55 | + zip -r ../dist.zip ${lambda_name}.zip |
| 56 | + # - name: Create Release |
| 57 | + # id: create_release |
| 58 | + # uses: actions/create-release@latest |
| 59 | + # env: |
| 60 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
| 61 | + # with: |
| 62 | + # tag_name: ${{ github.ref }} |
| 63 | + # release_name: Release ${{ github.ref }} |
| 64 | + # draft: true |
| 65 | + # prerelease: true |
| 66 | + # - name: Upload Release Asset |
| 67 | + # id: upload-release-asset |
| 68 | + # uses: actions/upload-release-asset@v1 |
| 69 | + # env: |
| 70 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 71 | + # with: |
| 72 | + # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps |
| 73 | + # asset_path: ./webhook.zip |
| 74 | + # asset_name: parser-${{ steps.tag_name.outputs.TAG }}.zip |
| 75 | + # asset_content_type: application/zip |
0 commit comments