github查看代码插件
Hi folks , after having a long time period I came to you with this article. Hope you guys may enjoy this. Are you willing to automate, customize and execute your software development workflow ? this is for you : )
嗨,大家好,经过很长一段时间,我才向您介绍这篇文章。 希望你们喜欢这个。 您是否愿意自动化,自定义和执行软件开发工作流程? 这个给你 : )
Before moving to our main topic, I would like to give you some general sense of the definition of GitHub Action Flow.
在转到我们的主要主题之前,我想给您一些关于GitHub Action Flow定义的一般知识。
什么是GitHub Action? (What is GitHub Action?)
Version controlling in the software project is a necessary task for software developers. Using GitHub we can track our progress and we can clearly manage our contribution with other developers. In 2018 GitHub gave more than just that to the developers. It introduces the GitHub Action flow for developers.
软件项目中的版本控制是软件开发人员的必要任务。 使用GitHub,我们可以跟踪我们的进度,并且可以清楚地与其他开发人员一起管理我们的贡献。 在2018年,GitHub不仅仅向开发人员提供了这些。 它为开发人员介绍了GitHub Action流程。
Basically, GitHub Actions enables you to create individual tasks for automating your action flow with the system. You can trigger the action with simple release a new version of project [Continuous Deployment], apply some push to some changes to branch automated, automate the testing process before your code merged the repository [Continuous Integration] and handle the cron job (background schedule jobs) in your workflows. Because of this immense automation ability DevOps Engineers got used to having GitHub action workflows for their production CI/CD.
基本上,GitHub Actions使您可以创建单个任务,以自动化系统的操作流程。 您可以通过简单地发布新版本的项目[Continuous Deployment]来触发操作,对分支的某些更改进行一些推送以自动化分支,在代码合并存储库之前自动执行测试过程[Continuous Integration]并处理cron作业(后台计划)工作)。 由于这种强大的自动化能力,DevOps工程师习惯于为其生产CI / CD使用GitHub动作工作流。
Now coming to the general purpose of this article, I’m ready to make you aware how to create a simple workflow to publish your VScode plugin to VScode marketplace.
现在谈到本文的一般目的,我准备让您知道如何创建一个简单的工作流以将VScode插件发布到VScode市场。
If we talk about the repository structure, we write our workflow in the file with the yaml extension. These workflow files are placed on the path .github/workflows folder in your repository. You can externally push yaml workflows to this folder or you can code your workflow with the GitHub workflow UI (image-02).
如果我们讨论存储库的结构,则将工作流程写入带有yaml扩展名的文件中。 这些工作流文件位于存储库中的路径.github / workflows文件夹中。 您可以从外部将yaml工作流推送到此文件夹,也可以使用GitHub工作流UI(image-02)编写工作流。
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/dbc1e465936ef5b9ddd77dd5a84161ae.png)
Before publishing the extension to the marketplace you need to create an account in Microsoft and take relevant secret keys for publishing the extensions. Through this link you can have a clear idea about how to publish a VScode plugin in the market place manually (publishing vscode extension to marketplace). Our task is to convert these manual steps to an automated way using our GitHub workflow.
在将扩展发布到市场之前,您需要在Microsoft中创建一个帐户,并获取相关的密钥以发布扩展。 通过此链接,您可以清楚地了解如何在市场上手动发布VScode插件(将vscode扩展发布到市场) 。 我们的任务是使用GitHub工作流程将这些手动步骤转换为自动化方式。
Reviewing the workflow code , We make the released type as a published for triggering our workflow(lines 1–3). When you go through the sample workflow code, you can see that we make our authentication key as a secret key in GitHub.
[R eviewing工作流的代码,我们做解除型的公布引发我们的工作流程(第1-3行)。 当您浏览示例工作流程代码时,您可以看到我们在GitHub中将身份验证密钥作为秘密密钥。
Upper part of the workflow we checked out to our workplace and made our working environment as we required.We set up the python version as version 3 because our rest of the process is compatible with version 3.
在工作流程的上半部分,我们检出了工作场所并根据需要创建了工作环境。我们将python版本设置为版本3,因为其余过程与版本3兼容。
We used VS Code VSCE GitHub Action plugin to process all the steps in the publishing tasks. You can see in line numbers 19–24, we are removing the previous plugin from the marketplace. It is not necessary, here we used it to avoid the conflict with the same plugin publication multiple times.
我们使用VS Code VSCE GitHub Action插件来处理发布任务中的所有步骤。 您可以在第19-24行看到,我们正在从市场中删除以前的插件。 不必要,这里我们使用它来避免与同一插件发布多次冲突。
Most important part is with lines 26–31. This is the main process we are going to do. In line 29 we gave a path to the vsix file that used to be published in the marketplace. You can wget the vsix file from your external place to Workflow without accessing it within the repository.
最重要的部分是第26-31行。 这是我们要做的主要过程。 在第29行中,我们提供了一个曾经在市场上发布过的vsix文件的路径。 您可以从外部将vsix文件获取到Workflow,而无需在存储库中访问它。
This is all about the simple workflow for publishing your extension to vscode marketplace . Now developers, DevOps engineers no need to worrying about publishing the product extension by manually. because GitHub gives the supper cool solution with action flows when publishing your any extensions to any marketplace at same time your release happening.
这就是将扩展发布到vscode marketplace的简单工作流程。 现在,开发人员,DevOps工程师无需担心手动发布产品扩展。 因为GitHub在发布任何扩展到任何市场的同时发布扩展时,它提供了行动流程超酷的解决方案。
Hope you guys have some cool idea form this article to work productive way with your production. Happy reading :) thank you all….:)
希望你们从本文中获得一些不错的主意,以便在您的作品中发挥出生产性的作用。 祝您阅读愉快:)谢谢大家.... :)
翻译自: https://medium.com/@lnash94.nk/github-action-flow-for-publishing-the-vs-code-plugin-676b9401e568
github查看代码插件