-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.15 KB
/
manual-vscode-release.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Manual VSCODE Release
on: [workflow_dispatch]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Install NodeJS v21
uses: actions/setup-node@v4
with:
node-version: 21
cache: 'npm'
- name: Install Deps
run: nix run .#install
- name: Build Prod
run: npm run build-prod
- name: Lint
run: npm run lint
# install playwright
- name: Install Playwright
run: npx playwright install
# Run the desktop tests using headless setup
- name: Extension Test
uses: coactions/setup-xvfb@v1
with:
run: npm test
- name: Git Config
run: |
git config --global user.email "${{ secrets.CI_GIT_EMAIL }}"
git config --global user.name "${{ secrets.CI_GIT_USER }}"
# bump version
- name: Bump Patch Version
run: echo "NEW_VERSION=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
# Commit changes and tag
- name: Commit And Tag
run: |
git add "package.json"
git add "package-lock.json"
git commit -m "Release ${{ env.NEW_VERSION }}"
git tag ${{ env.NEW_VERSION }}
# Push the commit to remote
- name: Push Changes To Remote
run: |
git push origin
git push -u origin ${{ env.NEW_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create gitHub release with built package archives
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.NEW_VERSION }}
name: Release ${{ env.NEW_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish an official version to vscode marketplace
- name: Official Publish To vscode Marketplace
run: y | npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}