-
Notifications
You must be signed in to change notification settings - Fork 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
Automatic GitHub releases and minor quality of life updates #1
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 package
You 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
.gitignore
that 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.vsix
But 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
.vsix
installable 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
.vsix
package automatically in GitHub servers with a GitHub Actions workflow triggered on each push in themain
branch and afterwards publishing it as a release with the version specified onpackage.json
, in theversion
field.In the fork, the worklow is configured to update releases with the same version number:
package.json
and push the changes to themain
branch and the workflow will automatically make a new release.package.json
and push a commit to themain
branch 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
makefile
with targetsarm-syntax-vscode-extension.vsix
or no options for conditional build,clean
to remove build, conditionalinstall
to install extension and conditionaluninstall
to uninstall extension.README.md
commands 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.makefile
and.github/
to.vscodeignore
..vsix
files.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.