Skip to content

Commit

Permalink
Push CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
deimonn committed Apr 26, 2024
1 parent 7fdbf16 commit dc87cb8
Showing 2 changed files with 70 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint and build extension

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 21.x

- name: Install extension dependencies
run: npm ci

- name: Run ESLint previous to building
run: npx eslint src --ext ts --max-warnings 0

- name: Build and package the extension
run: npx -p @vscode/vsce -c 'vsce package'
43 changes: 43 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish and release extension

on:
push:
tags:
- v**

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 21.x

- name: Install extension dependencies
run: npm ci

- name: Package extension
run: npx -p @vscode/vsce --yes -c 'vsce package'

- name: Publish on Visual Studio Marketplace
run: npx -p @vscode/vsce --yes -c 'vsce publish -i *.vsix'
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Publish on Eclipse Open VSX
run: npx -p ovsx --yes -c 'ovsx publish *.vsix'
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}

- name: Create release on GitHub
uses: softprops/action-gh-release@v1
with:
files: '*.vsix'
body: See [CHANGELOG.md](https://github.com/deimonn/oro-theme/blob/master/CHANGELOG.md) for a list of additions, changes and fixes.
prerelease: ${{ endsWith(github.ref, '-preview') }}
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit dc87cb8

Please sign in to comment.