Skip to content

Commit 8e41a56

Browse files
committed
♻️ chore: update release workflow to include linting and artifact upload
1 parent d7d11c7 commit 8e41a56

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- v*.*.*
7+
workflow_dispatch:
78

89
permissions:
910
contents: write
@@ -25,6 +26,9 @@ jobs:
2526
- name: Install dependencies
2627
run: npm ci
2728

29+
- name: Lint code
30+
run: npm run lint
31+
2832
- name: Run tests
2933
uses: coactions/setup-xvfb@v1
3034
with:
@@ -34,15 +38,23 @@ jobs:
3438
run: |
3539
npx @vscode/vsce package
3640
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: vsix-package
45+
path: '*.vsix'
46+
3747
- name: Get version from tag
3848
id: get_version
49+
if: startsWith(github.ref, 'refs/tags/')
3950
run: |
4051
VERSION=${GITHUB_REF#refs/tags/v}
4152
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
4253
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
4354
4455
- name: Extract changelog for version
4556
id: changelog
57+
if: startsWith(github.ref, 'refs/tags/')
4658
run: |
4759
VERSION=${GITHUB_REF#refs/tags/v}
4860
# Extract changelog section for this version
@@ -55,14 +67,16 @@ jobs:
5567
5668
- name: Create GitHub Release
5769
uses: ncipollo/release-action@v1
70+
if: startsWith(github.ref, 'refs/tags/')
5871
with:
59-
artifacts: "*.vsix"
72+
artifacts: '*.vsix'
6073
bodyFile: release_notes.md
6174
draft: false
6275
prerelease: false
63-
name: "Release ${{ steps.get_version.outputs.TAG }}"
76+
name: 'Release ${{ steps.get_version.outputs.TAG }}'
6477
tag: ${{ steps.get_version.outputs.TAG }}
6578
token: ${{ secrets.GITHUB_TOKEN }}
6679

6780
- name: Publish to VS Code Marketplace
81+
if: startsWith(github.ref, 'refs/tags/')
6882
run: npx @vscode/vsce publish --packagePath *.vsix -p ${{ secrets.VSCE_PAT }}

0 commit comments

Comments
 (0)