![]() We have a lot of JSON schema, and we have also a schema for GitHub actions. JSON Schema project wants to be a repository to include schemas for all commonly known JSON file formats.Ī schema is like a descriptor useful if you want to automate the check of your JSON file. A good support from your editor would be: suggest and show some directive description while you are typing and check the syntax and notify you if you are doing some error (typo, wrong directive etc). So, once you are able to start to write your workflow Yaml file, probably you would need a support in your editor, while you are creating/editing your Yaml file. This is the repository filled and maintained by the community where you could find some starter template for your language and/or framework. The official documentation about how to create your workflow Yaml file Ī workflow template. You need to understand how the “GitHub Workflow” process works and then you need to create a Yaml file to define your workflow configuration. Github.ref is from the github context (one of the many contexts) provided by GitHub Actions.Creating a workflow for GitHub Action is quite easy. This can be achieved using if condition ( Line #2 and #6 below), where I am checking if branch name is master. The only requirement I had was I wanted these deployment steps to execute only if the branch is master. ![]() You can read more on how to generate PAT here.įor deployment I could have used another job, but since my deployment steps are simple, I decided to use the same job. Once the deployment is done, I create a GitHub release (line #5 in code below). I have this command in my package.json file as deploy script. VSIX published as artifact Deploymentĭeploying a VSCode extension requires us to call vsce publish -p command. Once the successful run of action is completed, you will see VSIX file as an artifact. Jobs : cicd : name : cicd runs-on : windows-latest steps : - name : checkout repo uses : - name : fetch all history and tags from all branches for gitversion run : git fetch -prune -unshallow - name : install gitversion tool uses : gittools/actions/gitversion/ with : versionSpec : ' 5.1.x' - name : execute gitversion id : gitversion # step id used as reference for output values uses : gittools/actions/gitversion/ - name : print gitversion run : | echo "Major: $.vsix Lastly, make VSIX file available for download in GitHub Artifacts ( Line #60-64).( Line #53-54) - I use a custom npm script from package.json file, which internally uses vsce tool by Microsoft. Use a marketplace action to replace version in CHANGELOG.md file.Use marketplace action to update version in package.json ( Line #37-44).Install dependencies defined in pacakge.json ( Line #34-35). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |