-
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.45 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Package & Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Package & Release pushed tag
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- id: get-version
run: tag="${{ github.ref }}"; version=${tag#"refs/tags/v"}; echo "version=${version}" >> $GITHUB_OUTPUT
- name: Install dependencies
run: npm i
- name: Package
run: npm run package
- name: Upload artifact to action
uses: actions/upload-artifact@v4
with:
path: |
*.vsix
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./virtual-c-language-support-${{steps.get-version.outputs.version}}.vsix
asset_name: virtual-c-language-support-${{steps.get-version.outputs.version}}.vsix
asset_content_type: application/vsix