Update Monaco NPM Package #446
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: Update Monaco NPM Package | |
on: | |
schedule: | |
- cron: '0 23 * * *' | |
workflow_dispatch: | |
jobs: | |
update-monaco: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 8.0.x | |
- name: Git Checkout | |
run: | | |
dotnet tool install -g Microsoft.Web.LibraryManager.Cli | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: 21.x | |
- name: Install latest Monaco Editor via Microsoft LibMan | |
run: | | |
cd ./source/Monaco | |
libman update monaco-editor | |
- name: Extract and format version from loader.js | |
id: extract-version | |
run: | | |
version=$(sed -n 's/.*Version: \([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p' source/Monaco/monaco-editor/min/vs/loader.js) | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Delete Existing Monaco-Branch | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} | |
run: | | |
git push origin --delete update/MONACO-UPDATE-${{ steps.extract-version.outputs.version }} | |
- name: Git Commit/Push Changes | |
uses: actions-x/commit@v6 | |
with: | |
email: ${{ github.actor }}@users.noreply.github.com | |
name: ${{ github.actor }} | |
message: "added monaco changes" | |
branch: update/MONACO-UPDATE-${{ steps.extract-version.outputs.version }} | |
token: ${{ secrets.REPO_TOKEN }} |