Skip to content

Commit dc87cb8

Browse files
committed
Push CI configuration
1 parent 7fdbf16 commit dc87cb8

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/workflows/build.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint and build extension
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 21.x
19+
20+
- name: Install extension dependencies
21+
run: npm ci
22+
23+
- name: Run ESLint previous to building
24+
run: npx eslint src --ext ts --max-warnings 0
25+
26+
- name: Build and package the extension
27+
run: npx -p @vscode/vsce -c 'vsce package'

.github/workflows/publish.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish and release extension
2+
3+
on:
4+
push:
5+
tags:
6+
- v**
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 21.x
19+
20+
- name: Install extension dependencies
21+
run: npm ci
22+
23+
- name: Package extension
24+
run: npx -p @vscode/vsce --yes -c 'vsce package'
25+
26+
- name: Publish on Visual Studio Marketplace
27+
run: npx -p @vscode/vsce --yes -c 'vsce publish -i *.vsix'
28+
env:
29+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
30+
31+
- name: Publish on Eclipse Open VSX
32+
run: npx -p ovsx --yes -c 'ovsx publish *.vsix'
33+
env:
34+
OVSX_PAT: ${{ secrets.OVSX_PAT }}
35+
36+
- name: Create release on GitHub
37+
uses: softprops/action-gh-release@v1
38+
with:
39+
files: '*.vsix'
40+
body: See [CHANGELOG.md](https://github.com/deimonn/oro-theme/blob/master/CHANGELOG.md) for a list of additions, changes and fixes.
41+
prerelease: ${{ endsWith(github.ref, '-preview') }}
42+
env:
43+
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)