Refactor GitHub Actions workflows #7
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 and Publish VS Code Extensions | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
NODE_OPTIONS: --max-old-space-size=8192 | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OVSX_PAT: ${{ secrets.OVSX_PAT}} | |
steps: | |
- uses: actions/checkout@v1 | |
- run: | | |
git submodule init | |
git submodule update | |
name: Checkout VS Code | |
# should be aligned with https://github.com/microsoft/vscode/blob/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/.github/workflows/ci.yml#L108 | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libxkbfile-dev pkg-config libkrb5-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 | |
sudo cp vscode/build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb | |
sudo chmod +x /etc/init.d/xvfb | |
sudo update-rc.d xvfb defaults | |
sudo service xvfb start | |
name: Setup Build Environment | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: vscode/.nvmrc | |
- name: Check ovsx version | |
run: npx ovsx --version | |
- name: Bundle Extensions | |
run: | | |
yarn | |
yarn build:extensions | |
- name: Package Solid Version of Extensions | |
run: yarn package-vsix:latest | |
- name: Create built-in extensions pack | |
run: yarn create-extension-pack:latest | |
# Only publish the extensions if the workflow was manually triggered | |
- if: ${{ github.event_name == 'workflow_dispatch' }} | |
name: Publish Extensions to open-vsx.org | |
run: yarn publish:vsix |