This repository was archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (70 loc) · 2.42 KB
/
vsce.yml
File metadata and controls
72 lines (70 loc) · 2.42 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
67
68
69
70
71
72
# Ideas from https://dev.to/shaimendel/vs-code-extension-building-auto-ci-cd-with-github-actions-2dmf
name: vsce_release
on:
push:
branches:
- main
tags:
- '[0-9].[0-9]+.[0-9]+'
pull_request:
env:
DEFAULT_BRANCH: "master"
GITUHB_TOKEN: ${{ secrets.OPEN_NEEDS_CI }}
AZURE_TOKEN: ${{ secrets.AZURE_MARKETPLACE }}
jobs:
extension_build:
name: Build & Deploy
runs-on: ubuntu-latest
env:
ON_CI: True
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Installing npm dependencies
run: |
npm install -g typescript
npm install -g vsce
npm install
working-directory: ./vscode_ext
- name: Run headless test
# https://github.com/GabrielBB/xvfb-action
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
working-directory: ./vscode_ext
- name: Creating vsce package
run: "vsce package --baseContentUrl https://github.com/open-needs/open-needs-ide --baseImagesUrl https://github.com/open-needs/open-needs-ide"
working-directory: ./vscode_ext
env:
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}s
- name: Showing vs_code dir content
working-directory: ./vscode_ext
run: ls -la .
- name: Storing artifacts
uses: actions/upload-artifact@v2
with:
name: open-needs-ide-nightly.vsix
path: vscode_ext/open-needs-ide-*.vsix
retention-days: 7
- name: Creating common vsix file
run: |
mv vscode_ext/open-needs-ide-*.vsix vscode_ext/open-needs-ide-latest.vsix
- name: Releaseing on github releases
# https://github.com/pyTooling/Actions/tree/main/releaser
uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.OPEN_NEEDS_CI }}
tag: nightly
files: |
vscode_ext/open-needs-ide-latest.vsix
- name: Publish to Visual Studio Marketplace
# https://github.com/marketplace/actions/publish-vs-code-extension
uses: HaaLeo/publish-vscode-extension@v1
if: startsWith(github.ref, 'refs/tags/') # Only execute on tags
with:
pat: ${{ secrets.AZURE_MARKETPLACE }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: vscode_ext/open-needs-ide-latest.vsix