Skip to content

Commit

Permalink
Merge pull request #19 from SpontanCombust/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontanCombust authored Apr 12, 2024
2 parents 362209f + b62dae9 commit 29f27cd
Show file tree
Hide file tree
Showing 123 changed files with 7,318 additions and 1,136 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_assets/** linguist-generated
30 changes: 30 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy-pages

on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: write

jobs:
deploy-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-material
- name: Deploy
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
mkdocs gh-deploy -m "ci: update github pages"
40 changes: 31 additions & 9 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: draft-release
name: release

on:
push:
Expand All @@ -8,15 +8,16 @@ env:
CARGO_TERM_COLOR: always

jobs:
release:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
code_target: linux-x64
- os: windows-latest
target: x86_64-pc-windows-msvc
code_target: win32-x64

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -33,16 +34,37 @@ jobs:
override: true

- name: Build xtask
run: cargo build --package xtask --target ${{ matrix.target }} --release
run: cargo build --package xtask --release
- name: Prepare and pack the client
run: |
cargo xtask prep-lsp --target ${{ matrix.target }} --release
cargo xtask package --out-dir . --out-name "witcherscript-ide-${{ github.ref_name }}-${{ matrix.target }}"
- name: Create draft release
cargo xtask prep-server --target ${{ matrix.target }} --release
cargo xtask package -o "witcherscript-ide-${{ github.ref_name }}-${{ matrix.target }}.vsix --target ${{ matrix.code_target }}"
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.target }}
path: "*.vsix"


publish:
runs-on: ubuntu-latest
needs: build
if: success()

steps:
- name: Download artifacts
uses: actions/download-artifact@v2

- name: Create draft release on GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "*.vsix"
draft: true
allowUpdates: true
generateReleaseNotes: true
generateReleaseNotes: true

- name: Upload extension to the Marketplace
run: npx vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
24 changes: 24 additions & 0 deletions .github/workflows/update-ext-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: update-ext-docs

on:
push:
paths:
- docs/user-manual/changelog.md

permissions:
contents: write

jobs:
update-ext-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update extension's changelog
run: cp docs/user-manual/changelog.md editors/vscode/CHANGELOG.md
- name: Commit changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "ci: update extension docs"
git push
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.vscode/settings.json

/target

/editors/vscode/node_modules
/editors/vscode/out
/editors/vscode/server
*.vsix
*.vsix

/site
16 changes: 12 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,26 @@
"version": "0.2.0",
"configurations": [
{
"name": "VSCode Extension",
"name": "Launch Client",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/editors/vscode"
]
],
"outFiles": [
"${workspaceFolder}/editors/vscode/out/main.js.map",
],
},
{
"name": "Debug extension LSP",
"name": "Attach to Server",
"type": "lldb",
"request": "attach",
"program": "${workspaceFolder}/server/bin/witcherscript-lsp.exe"
"windows": {
"program": "${workspaceFolder}/server/bin/witcherscript-lsp.exe",
},
"linux": {
"program": "${workspaceFolder}/server/bin/witcherscript-lsp"
}
}
]
}
Loading

0 comments on commit 29f27cd

Please sign in to comment.