FEDX ownership #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '**' | |
release: | |
permissions: | |
pull-requests: write | |
contents: write | |
id-token: write | |
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: 17 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: true | |
- name: Compile | |
run: pnpm run compile | |
- name: Lint | |
run: pnpm run lint | |
- name: What is the OS | |
run: cat /etc/*-release | |
# Tests if using Linux | |
- name: install xvfb | |
run: sudo apt-get update && sudo apt-get install -y xvfb | |
if: runner.os == 'Linux' | |
- name: Run Tests and Generate XML Report | |
run: xvfb-run -a pnpm run test | |
if: runner.os == 'Linux' | |
# Tests if not using Linux | |
- name: Non-Linux Tests | |
run: pnpm run test | |
if: runner.os != 'Linux' | |
- name: Debug Path | |
run: ls -R out | |
- name: Upload XML Test Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports | |
path: out/test | |
- name: Upload Test Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Artifacts | |
path: artifacts/file.txt | |
# Generate vsix file and upload the artifact | |
- name: generate .vsix file | |
run: pnpm run package | |
- name: Upload .vsix Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vs-code-extension | |
path: "*.vsix" | |
- name: Generate SBOM | |
uses: anchore/sbom-action@v0 | |
with: | |
path: ./ | |
format: cyclonedx-json |