forked from adamviola/parquet-explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (56 loc) · 1.66 KB
/
Copy pathmain.yml
File metadata and controls
66 lines (56 loc) · 1.66 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
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
package:
name: Package & Publish Extension
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3.5.3
- name: Setup Node.js
uses: actions/setup-node@v3.7.0
with:
node-version: 20.5.1
- name: Install dependencies
run: npm install
- name: Install vsce
run: npm install --global @vscode/vsce
- name: Build & package extension
run: ./package.sh
- name: Upload build artifacts
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: vsix
path: dist/*.vsix
- name: Sync version from tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
TAG=${GITHUB_REF#refs/tags/v}
npm version "$TAG" --no-git-tag-version
# Publish to VS Code Marketplace.
- name: Publish to VS Code Marketplace
if: startsWith(github.ref, 'refs/tags/v')
env:
VSCE_PUBLISH_PERSONAL_ACCESS_TOKEN: ${{ secrets.VSCE_PUBLISH_PERSONAL_ACCESS_TOKEN }}
run: |
vsce publish --pat "$VSCE_PUBLISH_PERSONAL_ACCESS_TOKEN"
# Create GitHub Release.
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref, '-rc') }}
generate_release_notes: true
files: |
dist/*.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}