pnpm update #152
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: | |
pull_request: | |
push: | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restore pip cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-dev.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Prettier | |
uses: creyD/[email protected] | |
with: | |
dry: true | |
prettier_options: --check . | |
prettier_version: 2.8.8 | |
clean_node_folder: false | |
- name: ESlint | |
run: pnpm eslint | |
- name: Pylint | |
run: | | |
pip install -r scripts/requirements.txt | |
pip install -r scripts/requirements-dev.txt | |
pylint scripts | |
- name: Package nightly build | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
run: | | |
pnpm i --global @vscode/vsce | |
pnpm package | |
- name: Upload nightly build | |
uses: actions/upload-artifact@v4 | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
with: | |
name: bgforge-mls | |
path: "*.vsix" | |
- name: Publish to Open VSX Registry | |
if: "startsWith(github.ref, 'refs/tags/')" | |
uses: HaaLeo/publish-vscode-extension@v1 | |
id: publishToOpenVSX | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
# don't need deps, we bundle | |
# see https://github.com/microsoft/vscode-vsce/issues/421 | |
# and https://github.com/HaaLeo/publish-vscode-extension/issues/36 | |
dependencies: false | |
- name: Publish to Visual Studio Marketplace | |
if: "startsWith(github.ref, 'refs/tags/')" | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} | |
dependencies: false | |
- name: GitHub Release | |
if: "startsWith(github.ref, 'refs/tags/')" | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.ref_name }} | |
fail_on_unmatched_files: true | |
files: ${{ steps.publishToOpenVSX.outputs.vsixPath }} |