Skip to content

How to release

MatejKastak edited this page Mar 29, 2023 · 15 revisions

This is temporary flow until we have GithubActions release setup

git checkout master && git pull
export PASS=??? # fish: read -x PASS

# Write the changes to `CHANGELOG.md`
vim CHANGELOG.md
# Bump the version in `yls/version.py`, `pyproject.toml`, `pytest-yls/pyproject.toml`, `plugins/yls-yara/pyproject.toml`, `editors/vscode/package.json`
vim -p yls/version.py pyproject.toml pytest-yls/pyproject.toml plugins/yls-yara/pyproject.toml editors/vscode/package.json

poetry publish --build --username __token__ --password $PASS

cd pytest-yls
poetry publish --build --username __token__ --password $PASS
cd ..

cd plugins/yls-yara
# Wait until new version of yls is published on the registry (this might take a few minutes). I usually run the following step until the yls is not updated to a correct (new) version
poetry add yls@latest --no-cache
poetry publish --build --username __token__ --password $PASS
cd ../..

cd editors/vscode
rm vscode-yls.vsix # remove old release if present
yarn vsce package -o vscode-yls.vsix
# !!! Manual step: Publish the package via web intreface for vscode marketplace !!!
export TOKEN=??? # fish: read -x TOKEN
yarn ovsx publish vscode-yls.vsix -p $TOKEN
cd ../..

git add . && git status
git commit -m "Release v0.1.0"
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin master
git push origin v0.1.0

# NOTE: Sometimes to make sure that the build working I execute with `--dry-run` and then `rm -rf dist`
# poetry publish --dry-run --build --username __token__ --password $PASS