Skip to content

try fix 5

try fix 5 #4

Workflow file for this run

name: CI
on:
push:
branches:
- "ci"
tags:
- "v*"
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
rust_target: x86_64-pc-windows-gnu
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
rust_target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
platform: linux
arch: arm64
npm_config_arch: arm64
rust_target: aarch64-unknown-linux-gnu
- os: macos-latest
platform: darwin
arch: x64
npm_config_arch: x64
rust_target: x86_64-apple-darwin
- os: macos-latest
platform: darwin
arch: arm64
npm_config_arch: arm64
rust_target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20.17.0
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Install dependencies
if: matrix.arch == 'arm64' && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: cross build
run: rustup set auto-self-update disable && rustup target add ${{ matrix.rust_target }} && cargo build --verbose --release --target=${{ matrix.rust_target }}
CC: ${{ matrix.arch == 'arm64' && matrix.os == 'ubuntu-latest' && 'aarch64-linux-gnu-gcc' || '' }}

Check failure on line 58 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 58, Col: 9): Unexpected value 'CC'
- run: npm install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_config_arch }}
- name: Move execute file
run: |
npx webpack --mode production --config webpack.config.js
node -e "try {fs.renameSync('target/${process.env.TARGET}/release/jsonui-lsp', 'dist');}catch(err) {}"
node -e "try {fs.renameSync('target/${process.env.TARGET}/release/jsonui-lsp.exe', 'dist');}catch(err) {}"
env:
TARGET: ${{ matrix.rust_target }}
- shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
- run: npx vsce package --target ${{ env.target }}
- uses: actions/upload-artifact@v2
with:
name: ${{ env.target }}
path: "*.vsix"
publish:
runs-on: ubuntu-latest
needs: build
if: success() && startsWith( github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
- run: npx vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}