cargo update and fmt #620
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: Language Server | |
on: | |
push: | |
branches: [main] | |
tags: | |
- hls-v* | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build Languages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: hls | |
- name: Compile | |
run: | | |
cd hls | |
cargo build | |
- name: Upload Language | |
uses: actions/upload-artifact@v4 | |
with: | |
name: languages | |
path: hls/languages | |
package: | |
name: Package | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Remove Existing Languages | |
run: | | |
rm -rf hls/languages | |
- name: Download Languages | |
uses: actions/download-artifact@v4 | |
with: | |
name: languages | |
path: hls/languages | |
- name: Package | |
run: | | |
cd hls | |
npm install | |
npm install -g @vscode/vsce | |
vsce package | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hls | |
path: hls/*.vsix | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
cd hls | |
vsce publish -p ${{ secrets.VSCE_TOKEN }} |