Skip to content

Commit

Permalink
Vscode : release version 0.2.2 of the vscode extension (Deducteam#1112)
Browse files Browse the repository at this point in the history
* Vscode : release a new version of the vscode extension

* Vscode : fix secret name. add Condition on branch before publishing extension

* vscode : use new PAT

* vscode : fix new PAT

* check github repo name

* fix github repo name

* Vscode : publish extension. make messages more explicit
  • Loading branch information
Alidra authored May 16, 2024
1 parent bc30e3e commit 230bfec
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
make build-vscode-extension
make publish-vscode-extension
env:
PAT: ${{secrets.VSCODE_PAT}}
- name: publish vscode extension
PAT: ${{ secrets.VSCODE_PAT }}
- name: upload vscode extension
uses: actions/upload-artifact@v4
with:
name: assets-for-download
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,27 @@ JQ = $(shell which jq)
ifneq ($(VSCE),)
ifneq ($(JQ),)
EXT = $(shell vsce show --json deducteam.lambdapi 2>/dev/null | jq '.versions[0]' | jq '.version')

.PHONY: publish-vscode-extension
publish-vscode-extension:
ifeq ($(EXT), $(shell cat editors/vscode/package.json | jq '.version'))
echo "extension already exists. Skip"
else
ifeq ($(PAT),)
# Note, when pushing code from a fork of the Lambdapi repository, PAT secret is not "reachable".
# The extension is only published when merge occurs.
echo "The \"PAT\" secret is not set. Please check a PAT exists with permissions to publish to Vscode market"
else
ifeq ('master', $(GITHUB_REF_NAME))
# The extension is only published when code is pushed to master to avoid publishing from feature branches
cd editors/vscode && vsce publish -p ${PAT}
else
echo "Env Variable \"GITHUB_REF_NAME\" is set to \"$(GITHUB_REF_NAME)\"."
echo "Extension will only be published when pushing to master."
echo "If used manualy, please set Variable \"GITHUB_REF_NAME\" to \"master\" to force publishing the extension"
endif
endif
endif

endif
endif
7 changes: 5 additions & 2 deletions editors/vscode/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]
## [0.2.2]
- code refactoring of the client for maintenability.
- fix the bug that causes the proof navigation to malfunction when the Goals panel is closed by the user. Now the panel is recreated whenever needed.
- fix the bug that causes the proof navigation to malfunction when the `Goals` panel is closed by the user. Now the panel is recreated whenever needed. If focus is taken away frol the `Goals` panel, focus is given back to it when user starts navigating proofs again.
- fix bug related to navigating sub-goals : navigating next subgoal stops before `{` instead of after it so that next subgoal is correctly shown in the `Goals` panel.
- change navigation with ``navigate until cursor`` : Navigation includes the command if the cursor is whithin its range instead of the line above.
- first command is no more systematically navigated. If the current command is the first one, navigating the previous command results in no command being navigated.

## [0.1.2] - 2020-12-10
- use vscode configuration for lambdapi.path to call the lambdapi LSP server
Expand Down
4 changes: 2 additions & 2 deletions editors/vscode/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ TODO list for a new release on the VSCode Marketplace

The github DICD pipeline detects the existance of a new version of the Lambdapi extension for Vscode based on the `version` field in the `editors/vscode/package.json` file and publishes it on the Marketplace.

Please note that a valid Azure Personal Access Token (PAT) is required for this operation. This PAT must be saved in the `PAT` environment variable as described [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
Please note that a valid Azure Personal Access Token (PAT) is required for this operation. This PAT must be saved in the `VSCODE_PAT` environment variable as described [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).

If the pipeline fails at publishing the extension, it may be due to the PAT being expired.
Please generate a new one on [Azure](https://dev.azure.com/lambdapi/) and update the `PAT` env variable value as described in the link above.
Please generate a new one on [Azure](https://dev.azure.com/lambdapi/) and update the `VSCODE_PAT` env variable value as described in the link above.

**manual release**

Expand Down
2 changes: 1 addition & 1 deletion editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"François Lefoulon <[email protected]>",
"Ashish Barnawal <[email protected]>"
],
"version": "0.2.1",
"version": "0.2.2",
"publisher": "Deducteam",
"engines": {
"vscode": "^1.82.0"
Expand Down

0 comments on commit 230bfec

Please sign in to comment.