Repository navigation
53 lines (49 loc) · 1.81 KB
/
Copy pathrelease-vscode.yml
File metadata and controls
53 lines (49 loc) · 1.81 KB
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
name: Release VS Code Extension
on:
push:
tags:
- 'vscode-v*'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
cache: npm
node-version-file: .nvmrc
- name: Check release version
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
version=$(node -p "require('./platforms/vscode/package.json').version")
if [[ "$RELEASE_TAG" != "vscode-v$version" ]]; then
echo "Expected tag vscode-v$version for platforms/vscode/package.json, got $RELEASE_TAG" >&2
exit 1
fi
- uses: ./.github/actions/install-dependencies
- name: Build packages
run: npm run build
- name: Package VS Code extension
run: npm exec --workspace=platforms/vscode -- vsce package --no-dependencies --out blockflow-vscode.vsix
- name: Upload VSIX
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: ${{ github.ref_name }}
path: platforms/vscode/blockflow-vscode.vsix
if-no-files-found: error
- name: Publish to VS Code Marketplace
run: npm exec --workspace=platforms/vscode -- vsce publish --packagePath blockflow-vscode.vsix --skip-duplicate
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
- name: Publish to Open VSX
run: npx --yes ovsx@0.10.6 publish platforms/vscode/blockflow-vscode.vsix --skip-duplicate
env:
OVSX_PAT: ${{ secrets.OVSX_TOKEN }}