2020-10-13 15:35:08 +03:00
|
|
|
name: CI
|
|
|
|
on:
|
|
|
|
push:
|
2021-01-03 02:34:04 +03:00
|
|
|
branches: [ master ]
|
2020-10-13 15:35:08 +03:00
|
|
|
pull_request:
|
2021-01-03 02:34:04 +03:00
|
|
|
branches: [ master ]
|
2020-10-13 15:35:08 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn
|
|
|
|
|
|
|
|
- name: Check formatting and lints
|
|
|
|
run: yarn run check
|
2021-05-04 23:09:29 +03:00
|
|
|
|
|
|
|
- name: Ensure auto-generated files are up-to-date
|
|
|
|
run: yarn run ts-node ./meta.ts --ensure-up-to-date --check
|
|
|
|
|
|
|
|
- name: Check tests
|
2021-05-04 23:38:05 +03:00
|
|
|
run: xvfb-run -a yarn run test
|
2021-05-06 20:39:32 +03:00
|
|
|
env:
|
|
|
|
MOCHA_REPORTER: dot
|
2021-05-04 23:09:29 +03:00
|
|
|
|
2022-07-31 10:01:45 +03:00
|
|
|
publish:
|
|
|
|
needs: check
|
|
|
|
if: ${{ github.event_name == 'push' }}
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-11-08 23:28:15 +03:00
|
|
|
- name: Create tag based on package.json
|
|
|
|
uses: butlerlogic/action-autotag@ade8d2e19bfcd1e6a91272e2849b4bf4c37a67f1
|
2021-11-08 23:20:38 +03:00
|
|
|
id: autotag
|
2021-05-04 23:09:29 +03:00
|
|
|
with:
|
|
|
|
tag_prefix: v
|
2022-07-31 10:01:45 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2021-11-08 23:20:38 +03:00
|
|
|
|
|
|
|
- name: Publish to Open VSX Registry
|
|
|
|
uses: HaaLeo/publish-vscode-extension@8dd35ed51f326dfb0a3e9cfc6baeca81781229fc
|
2022-07-31 10:01:45 +03:00
|
|
|
if: ${{ steps.autotag.outputs.tagcreated == 'yes' }}
|
2021-11-08 23:20:38 +03:00
|
|
|
id: publishToOpenVSX
|
|
|
|
with:
|
|
|
|
pat: ${{ secrets.OPEN_VSX_TOKEN }}
|
|
|
|
yarn: true
|
|
|
|
|
|
|
|
- name: Publish to Visual Studio Marketplace
|
|
|
|
uses: HaaLeo/publish-vscode-extension@8dd35ed51f326dfb0a3e9cfc6baeca81781229fc
|
2022-07-31 10:01:45 +03:00
|
|
|
if: ${{ steps.autotag.outputs.tagcreated == 'yes' }}
|
2021-11-08 23:20:38 +03:00
|
|
|
with:
|
|
|
|
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
|
|
|
|
registryUrl: https://marketplace.visualstudio.com
|
|
|
|
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
|
|
|
|
packagePath: ''
|
|
|
|
yarn: true
|