|
12 | 12 | contents: write |
13 | 13 |
|
14 | 14 | steps: |
15 | | - - name: Create Release |
16 | | - env: |
17 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
18 | | - run: | |
19 | | - curl -X POST \ |
20 | | - -H "Authorization: token ${{ env.GITHUB_TOKEN }}" \ |
21 | | - -H "Accept: application/vnd.github+json" \ |
22 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
23 | | - https://api.github.com/repos/${{ github.repository }}/releases \ |
24 | | - -d '{ |
25 | | - "tag_name": "${{ github.ref_name }}", |
26 | | - "name": "DAP ${{ github.ref_name }}", |
27 | | - "draft": true, |
28 | | - "body": "# What is new in DAP" |
29 | | - }' |
30 | 15 | - name: Code Checkout |
31 | 16 | uses: actions/checkout@v4 |
32 | 17 | - name: Install Node |
|
37 | 22 | - name: Install node dependencies |
38 | 23 | run: npm ci |
39 | 24 | - name: Build distribution |
40 | | - run: npm run build |
41 | | - - name: Upload build artifacts |
42 | | - uses: actions/upload-artifact@v4 |
43 | | - with: |
44 | | - name: dap-distribution |
45 | | - path: dist |
46 | | - - name: Upload Asset to Release |
47 | | - env: |
48 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
49 | 25 | run: | |
50 | | - curl -X POST \ |
51 | | - -H "Authorization: token ${{ env.GITHUB_TOKEN }}" \ |
52 | | - -H "Accept: application/vnd.github+json" \ |
53 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
54 | | - -H "Content-Type: application/octet-stream" \ |
55 | | - --data-binary ${{ steps.build_distribution.output }} \ |
56 | | - "${{ steps.create_release.outputs.upload_url }}?name=dap-${{ github.ref_name }}.zip" |
| 26 | + npm run build |
| 27 | + tar -czvf dap-${{ github.ref_name }}.tar.gz dist |
| 28 | + - name: Create draft release |
| 29 | + run: | |
| 30 | + create-draft-release.sh ${{ github.ref_name }} dap-${{ github.ref_name }}.tar.gz |
0 commit comments