-
Notifications
You must be signed in to change notification settings - Fork 1
Automatic GitHub releases and minor quality of life updates #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…issing image needed for building, added makefile, added new files to .vscodeignore and .gitignore, working on workflow for automated releasing on push on main branch
|
Hello again, you merged the changes, but I think that you did not add the authentication token (correct me if I am wrong). Without the token my functionality will not work and no releases will be automatically made: If we inspect the last workflow run of your repo we can see the following error: This probably means that the authentication token was not supplied to the workflow, which resulted in error and no release published automatically. I will explain how to add the token step by step and trigger the first release in order to make the automatic installation work.
git checkout master
git pull origin master
git commit -am "empty commit to trigger workflow" --allow-empty
git push origin master
Thank you for your collaboration. |
|
Hi there @ininavicode , Sorry to bother you again, but the workflow failed because it does not have permission to write the release to the repo. To give write permissions you need to go here (settings of the repo, then actions menu): And select write and read permissions for the workflow. I hope that with this change we can finally have this working 👯 Thank you for keeping up the great work. |







With these changes I wanted to give the users the freedom of automating the process of installation using the terminal, either by cloning the repository, building the extension and installing it or by downloading and installing the latest release. I also added some minor quality of life updates in the repository.
The justification and explanation for each feature is the following:
Justification of changes for automating the build process
If you want to automate the building process by:
git clone https://github.com/ininavicode/arm-syntax-vscode-extension cd arm-syntax-vscode-extension vsce packageYou will find the following error:
Obviously, this is because the logo is missing in the repo. I simply added it on the fork, so the previous commands can work correctly.
I also removed the rule in the
.gitignorethat ignores the pathimages/, since the image was expected to be in this path.I am guessing that because the logo is a binary file and not a text file you (reasonably) wanted to ignore it, but since the logo is a build dependency, I think this is a clear exception and must be included in the repository to allow this behaviour.
Justification of changes for automating the download process
I tried automating the installation process by:
wget https://somelink.com/arm-syntax-vscode-extension-latest-version.vsix # Direct dynamic link to vsix with latest changes code --install-extension arm-syntax-vscode-extension-latest-version.vsixBut I was not able to find a direct dynamic link to the installable latest version of the extension. This is a URL (or something that provides information to generate that URL) that points to a
.vsixinstallable package of the extension built with the latest changes in the code.Anyway, by using GitHub releases we can get this type of service for free by building the
.vsixpackage automatically in GitHub servers with a GitHub Actions workflow triggered on each push in themainbranch and afterwards publishing it as a release with the version specified onpackage.json, in theversionfield.In the fork, the worklow is configured to update releases with the same version number:
package.jsonand push the changes to themainbranch and the workflow will automatically make a new release.package.jsonand push a commit to themainbranch and the workflow will update that release.Due to the previous, users can do the following to achieve the idea of the previous snippet:
Minor changes
makefilewith targetsarm-syntax-vscode-extension.vsixor no options for conditional build,cleanto remove build, conditionalinstallto install extension and conditionaluninstallto uninstall extension.README.mdcommands to build extension, to install extension from terminal, to install requirements, a badge to show number of downloads in VSCode marketplace that links to the marketplace entry of the extension, build requirements with fancy badges, added Estructura de Sistemes Operatius and Fonaments de Computadors to the "adapted for" enumeration in the Features section.makefileand.github/to.vscodeignore..vsixfiles.Workflow considerations
To make the workflow work, (in addition to merging this pull request) you will need to activate GitHub Actions in this repository.
You will also need to provide a token to it in order to authorize the creation of releases by the workflow. You may do so by creating a new repository secret called
GH_TOKEN. Inside this secret you need to paste a classic personal access token with all the "repo" permissions checked. You can create it from the developer settings in the settings on your GitHub profile.I tested the code extensively, but if you detect errors let me know by requesting changes and I will address them in further commits.
Thank you for creating this wonderful piece of software that I am currently incorporating into my stack.