11name : release
22
33on :
4+ schedule :
5+ - cron : ' 0 8 * * *'
46 workflow_dispatch :
57 inputs :
68 publishPreRelease :
@@ -39,10 +41,17 @@ jobs:
3941 with :
4042 path : release
4143 node-version : 20
44+ - name : Set version to prerelease version
45+ run : node change-version-to-prerelease.mjs
46+ if : ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
4247 - name : Install dependencies
4348 run : |
4449 npm install -g typescript "@vscode/vsce" "ovsx"
4550 echo "EXT_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV
51+ # Install latest yaml-language-server in the case of a prerelease
52+ - name : Update yaml-language-server
53+ if : ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
54+ run : npm i yaml-language-server@next
4655 - name : Build vscode-yaml
4756 uses : coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1.0.1
4857 with :
@@ -55,10 +64,17 @@ jobs:
5564 with :
5665 run : npm test --silent
5766 - name : Package
67+ if : ${{ github.event_name != 'schedule' && inputs.publishPreRelease == 'false'}}
5868 run : |
5969 vsce package -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
6070 sha256sum *.vsix > vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix.sha256
6171 ls -lash *.vsix *.sha256
72+ - name : Package pre-release
73+ if : ${{ github.event_name == 'schedule' || inputs.publishPreRelease == 'true'}}
74+ run : |
75+ vsce package --pre-release -o vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix
76+ sha256sum *.vsix > vscode-yaml-${{ env.EXT_VERSION }}-${GITHUB_RUN_NUMBER}.vsix.sha256
77+ ls -lash *.vsix *.sha256
6278 - name : Upload VSIX Artifacts
6379 uses : actions/upload-artifact@v4
6480 with :
0 commit comments