v1.10.3 #12
Workflow file for this run
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: Contextive VSCode Publish | |
on: | |
release: | |
types: [published] | |
env: | |
dotnet-version: '6.0.x' | |
CONTEXTIVE_DEBUG: true | |
jobs: | |
publish: | |
name: Publish | |
strategy: | |
matrix: | |
include: | |
- dotnet_runtime: win-x64 | |
vsce_platform: win32-x64 | |
os: windows-latest | |
- dotnet_runtime: linux-x64 | |
vsce_platform: linux-x64 | |
os: ubuntu-latest | |
- dotnet_runtime: linux-arm64 | |
vsce_platform: linux-arm64 | |
os: ubuntu-latest | |
- dotnet_runtime: osx-x64 | |
vsce_platform: darwin-x64 | |
os: macos-latest | |
- dotnet_runtime: osx-arm64 | |
vsce_platform: darwin-arm64 | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | |
- name: Setup .NET Core SDK ${{ env.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.dotnet-version }} | |
- name: Display dotnet version | |
run: dotnet --version | |
- name: Install Fable | |
run: dotnet tool install fable --global | |
- name: Install paket | |
run: dotnet tool install paket --global | |
- name: Restore paket dependencies | |
run: paket restore | |
working-directory: ./src | |
- name: Build Language Server | |
run: | | |
dotnet publish -c Release -r ${{ matrix.dotnet_runtime }} -o publish --self-contained | |
working-directory: ./src/language-server/Contextive.LanguageServer | |
- name: Copy Language Server to VsCode Extension Folder | |
run: mkdir -p ../../vscode/contextive/dist && cp publish/* ../../vscode/contextive/dist | |
working-directory: ./src/language-server/Contextive.LanguageServer | |
- name: Restore npm dependencies | |
run: npm install | |
working-directory: ./src/vscode/contextive | |
- name: Package VsCode Extension | |
run: npx vsce package -t ${{ matrix.vsce_platform }} --githubBranch main --baseImagesUrl https://raw.githubusercontent.com/dev-cycles/contextive/${{ github.ref_name }}/src/vscode/contextive/ | |
working-directory: ./src/vscode/contextive | |
- name: Get Package Version | |
run: echo "VERSION=$(jq .version package.json -r)" >> $GITHUB_OUTPUT | |
id: get-version | |
shell: bash | |
working-directory: ./src/vscode/contextive | |
- name: Zip Language Server (Ubuntu) | |
run: | | |
zip ../Contextive.LanguageServer-${{ matrix.dotnet_runtime }}-${{ steps.get-version.outputs.VERSION}}.zip * | |
working-directory: ./src/language-server/Contextive.LanguageServer/publish | |
if: ${{ contains(matrix.os, 'ubuntu') }} | |
- name: Zip Language Server (Others) | |
run: | | |
7z a ../Contextive.LanguageServer-${{ matrix.dotnet_runtime }}-${{ steps.get-version.outputs.VERSION}}.zip * | |
working-directory: ./src/language-server/Contextive.LanguageServer/publish | |
if: ${{ ! contains(matrix.os, 'ubuntu') }} | |
- name: Upload Language Server to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "src/language-server/Contextive.LanguageServer/Contextive.LanguageServer-${{ matrix.dotnet_runtime }}-${{ steps.get-version.outputs.VERSION}}.zip" | |
tag: ${{ github.ref }} | |
- name: Upload VsCode VSix to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "src/vscode/contextive/contextive-${{ matrix.vsce_platform }}-${{ steps.get-version.outputs.VERSION}}.vsix" | |
tag: ${{ github.ref }} | |
- run: npx vsce publish --packagePath contextive-${{ matrix.vsce_platform }}-${{ steps.get-version.outputs.VERSION}}.vsix | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
working-directory: ./src/vscode/contextive |