Skip to content

Bump @vscode/test-web from 0.0.30 to 0.0.48 #3230

Bump @vscode/test-web from 0.0.30 to 0.0.48

Bump @vscode/test-web from 0.0.30 to 0.0.48 #3230

Workflow file for this run

name: "Main"
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
name: Test on ${{ matrix.os }}
steps:
- uses: pnpm/action-setup@v2
with:
version: 7
run_install: false
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb"
shell: bash
if: ${{ success() && matrix.os == 'ubuntu-latest' }}
- run: yarn install
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: yarn test
env:
DISPLAY: ":99.0"
package:
runs-on: ubuntu-latest
needs: test
name: Package
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: yarn install
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm install -g vsce
- run: vsce package
- run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV
- run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
path: ${{ env.VSIX_PATH }}
name: ${{ env.VSIX_NAME }}
release:
runs-on: ubuntu-latest
needs: package
if: startsWith(github.ref, 'refs/tags/v')
name: Release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: yarn install
- run: npm install -g vsce
- run: vsce package
- run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV
- run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: See [CHANGE LOG](https://github.com/prettier/prettier-vscode/blob/main/CHANGELOG.md) for details.
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.VSIX_PATH }}
asset_name: ${{ env.VSIX_NAME }}
asset_content_type: application/zip
- run: vsce publish -p ${{ secrets.MARKETPLACE_TOKEN }}