Skip to content

Commit 602aa16

Browse files
authored
Update main.yml
1 parent 8787529 commit 602aa16

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

.github/workflows/main.yml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,52 @@ jobs:
2828
- name: Build VSIX package
2929
run: vsce package
3030
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
3169

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 }}
3475
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

Comments
 (0)