Skip to content

Fix formatter

Fix formatter #451

Workflow file for this run

# Adapted from https://github.com/HaaLeo/vscode-timing/.github/workflows/cicd.yml
name: Build, Lint, and Deploy
on:
push:
branches:
- '*'
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
release:
types:
- published
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}'
cancel-in-progress: true
env:
SKIP: make-all
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pre-commit/[email protected]
build-lint:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-latest
node:
- 18.12.1
outputs:
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
- name: Run Linter
run: npm run lint
- name: Build Code
run: npm run compile
- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
- name: Upload Extension Package as Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: ${{ steps.packageExtension.outputs.vsixPath }}
publish:
name: Publish Github Action
needs:
- build-lint
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Install Node v18
uses: actions/setup-node@v1
with:
node-version: 18.12.1
- name: Install Dependencies
run: npm ci
- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
name: ubuntu-latest
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: false
name: ${{ github.ref_name }}
fail_on_unmatched_files: true
files: |
${{ needs.build-lint.outputs.vsixPath }}
LICENSE
README.md
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
extensionFile: ${{ needs.build-lint.outputs.vsixPath }}
registryUrl: https://marketplace.visualstudio.com
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
extensionFile: ${{ needs.build-lint.outputs.vsixPath }}