Bump @types/node from 20.11.30 to 22.9.1 #3919
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: "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@v4 | |
with: | |
version: 7 | |
run_install: false | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- 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 | |
- run: yarn test | |
env: | |
DISPLAY: ":99.0" | |
package: | |
runs-on: ubuntu-latest | |
needs: test | |
name: Package | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- 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/upload-artifact@v4 | |
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@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- 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 }} |