|
28 | 28 | - name: Build VSIX package
|
29 | 29 | run: vsce package
|
30 | 30 | working-directory: nucleo-debugger
|
| 31 | +name: Build VSIX |
| 32 | + |
| 33 | +on: |
| 34 | + push: |
| 35 | + branches: |
| 36 | + - main |
| 37 | + |
| 38 | +jobs: |
| 39 | + build: |
| 40 | + runs-on: ubuntu-latest |
| 41 | + |
| 42 | + steps: |
| 43 | + - name: Checkout code |
| 44 | + uses: actions/checkout@v2 |
| 45 | + |
| 46 | + - name: Setup Node.js environment |
| 47 | + uses: actions/setup-node@v2 |
| 48 | + with: |
| 49 | + node-version: '14' |
| 50 | + |
| 51 | + - name: Install dependencies |
| 52 | + run: yarn install |
| 53 | + working-directory: nucleo-debugger |
| 54 | + |
| 55 | + - name: Build VSIX package |
| 56 | + run: yarn vsce package |
| 57 | + working-directory: nucleo-debugger |
| 58 | + |
| 59 | + - name: Create Release |
| 60 | + id: create_release |
| 61 | + uses: actions/create-release@v1 |
| 62 | + env: |
| 63 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token |
| 64 | + with: |
| 65 | + tag_name: ${{ github.ref }} |
| 66 | + release_name: Release ${{ github.ref }} |
| 67 | + draft: false |
| 68 | + prerelease: false |
31 | 69 |
|
32 |
| - - name: Upload VSIX package |
33 |
| - uses: actions/upload-artifact@v2 |
| 70 | + - name: Upload Release Asset |
| 71 | + id: upload-release-asset |
| 72 | + uses: actions/upload-release-asset@v1 |
| 73 | + env: |
| 74 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
34 | 75 | with:
|
35 |
| - name: my-extension.vsix |
36 |
| - path: nucleo-debugger/*.vsix |
| 76 | + 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 |
| 77 | + asset_path: ./nucleo-debugger/*.vsix |
| 78 | + asset_name: nucleo-debugger.vsix |
| 79 | + asset_content_type: application/octet-stream |
0 commit comments