Skip to content

Commit 0093216

Browse files
authored
Merge pull request #111 from vunguyentuan/fix-ci
add force publish
2 parents 3c4a644 + 400132a commit 0093216

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish to Marketplace
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target:
7+
description: 'Publishing target'
8+
required: true
9+
type: choice
10+
options:
11+
- 'vscode-marketplace'
12+
- 'openvsx'
13+
- 'both'
14+
default: 'both'
15+
16+
jobs:
17+
publish:
18+
name: Force Publish to Marketplace
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out branch
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Node.js 20.x
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20.x
28+
cache: 'npm'
29+
30+
- name: Enable Corepack
31+
run: corepack enable
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
env:
36+
CI: true
37+
38+
- name: Build packages
39+
run: npm run build
40+
41+
- name: Package extension
42+
working-directory: ./packages/vscode-css-variables
43+
run: npx vsce package
44+
45+
- name: Publish to VSCode Marketplace
46+
if: inputs.target == 'vscode-marketplace' || inputs.target == 'both'
47+
working-directory: ./packages/vscode-css-variables
48+
run: npx vsce publish -p ${{ secrets.VSCE_PAT }}
49+
50+
- name: Publish to OpenVSX
51+
if: inputs.target == 'openvsx' || inputs.target == 'both'
52+
working-directory: ./packages/vscode-css-variables
53+
run: npx ovsx publish -p ${{ secrets.OVSX_TOKEN }}
54+
55+
- name: Upload VSIX artifact
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: vscode-css-variables-vsix
59+
path: ./packages/vscode-css-variables/*.vsix
60+
retention-days: 30

0 commit comments

Comments
 (0)