[{"data":1,"prerenderedAt":1646},["Reactive",2],{"navigation":3,"/posts/wingetcreate":204,"/posts/wingetcreate-surround":1617},[4,192,200],{"title":5,"_path":6,"children":7,"icon":191},"Blog","/posts",[8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,77,80,83,86,89,92,95,98,101,104,107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,176,179,182,185,188],{"title":9,"_path":10},"Testing your API with REST Client","/posts/testing-your-api-with-rest-client",{"title":12,"_path":13},"HTML templating in Xamarin","/posts/html-templating-in-xamarin",{"title":15,"_path":16},"Goodbye Azure Portal, Welcome Azure CLI","/posts/welcome-azure-cli",{"title":18,"_path":19},"Coming across Gitpod","/posts/gitpod",{"title":21,"_path":22},"Handle token retrieval while querying an API","/posts/delegating-handler",{"title":24,"_path":25},"Clean up your local git branches.","/posts/cleaning-git-branches",{"title":27,"_path":28},"Automate configuration of Teams Tab SSO with PowerShell.","/posts/teams-sso-powershell",{"title":30,"_path":31},"How to do a technology watch? - Part 1","/posts/technology-watch-part1",{"title":33,"_path":34},"How to do a technology watch? - Part 2","/posts/technology-watch-part2",{"title":36,"_path":37},"You almost no longer need Key Vault references for Azure Functions.","/posts/azure-functions-custom-configuration",{"title":39,"_path":40},"How to do a technology watch? - Part 3","/posts/technology-watch-part3",{"title":42,"_path":43},"Forget DevOps, the future is already here!","/posts/devops-future",{"title":45,"_path":46},"Week 9, 2021 - Tips I learned this week","/posts/w09-2021-tips-learned-this-week",{"title":48,"_path":49},"Week 12, 2021 - Tips I learned this week","/posts/w12-2021-tips-learned-this-week",{"title":51,"_path":52},"Week 14, 2021 - Tips I learned this week","/posts/w14-2021-tips-learned-this-week",{"title":54,"_path":55},"Once upon a time in .NET","/posts/once-upon-a-time-in-dotnet",{"title":57,"_path":58},"Install your applications with winget","/posts/winget-import",{"title":60,"_path":61},"Customize your applications when installing them with winget","/posts/winget-override",{"title":63,"_path":64},"Week 22, 2021 - Tips I learned this week","/posts/w22-2021-tips-learned-this-week",{"title":66,"_path":67},"How to connect to an Azure SQL Database from C# using Azure AD","/posts/sqlclient-active-directory-authent",{"title":69,"_path":70},"Producing packages for Windows Package Manager","/posts/wingetcreate",{"title":72,"_path":73},"4 tips about GitHub Actions environment variables and contexts","/posts/github-actions-var-and-context",{"title":75,"_path":76},"AzureWebJobsStorage, the secret you don't need in your Function App.","/posts/azure-functions-without-azurewebjobsstorage",{"title":78,"_path":79},"ASP.NET Core - Lost in configuration","/posts/lost-in-configuration",{"title":81,"_path":82},"Week 39, 2021 - Tips I learned this week","/posts/w39-2021-tips-learned-this-week",{"title":84,"_path":85},"Week 41, 2021 - Tips I learned this week","/posts/w41-2021-tips-learned-this-week",{"title":87,"_path":88},"Migrating and open-sourcing my blog","/posts/migrating-blog",{"title":90,"_path":91},"Week 45, 2021 - Tips I learned this week","/posts/w45-2021-tips-learned-this-week",{"title":93,"_path":94},"Organize your GitHub stars with Astral","/posts/astral",{"title":96,"_path":97},"Pulumi with an Azure Blob Storage backend","/posts/pulumi-azure-backend",{"title":99,"_path":100},"IaC Hot Reload with Pulumi Watch","/posts/pulumi-watch",{"title":102,"_path":103},"Week 2, 2022 - Tips I learned this week","/posts/w02-2022-tips-learned-this-week",{"title":105,"_path":106},"Week 3, 2022 - Tips I learned this week","/posts/w03-2022-tips-learned-this-week",{"title":108,"_path":109},"Week 5, 2022 - Tips I learned this week","/posts/w05-2022-tips-learned-this-week",{"title":111,"_path":112},"How to provision an Azure SQL Database with Active Directory authentication","/posts/sqldatabase-active-directory-authent",{"title":114,"_path":115},"Why will I choose Pulumi over Terraform for my next project?","/posts/pulumi-vs-terraform",{"title":117,"_path":118},"Week 19, 2022 - Tips I learned this week","/posts/w19-2022-tips-learned-this-week",{"title":120,"_path":121},"Week 20, 2022 - Tips I learned this week","/posts/w20-2022-tips-learned-this-week",{"title":123,"_path":124},"Keeping secrets secure when using API Clients","/posts/http-clients-secrets",{"title":126,"_path":127},"What made me want to be a developer?","/posts/be-a-developer",{"title":129,"_path":130},"What can we do when stuck with a programming problem?","/posts/get-unstuck",{"title":132,"_path":133},"How did I automate the setup of my developer Windows laptop?","/posts/automate-developer-machine",{"title":135,"_path":136},"Discussion about API clients","/posts/http-clients",{"title":138,"_path":139},"Week 46, 2022 - Tips I learned this week","/posts/w46-2022-tips-learned-this-week",{"title":141,"_path":142},"When Pulumi met Nuke: a .NET love story","/posts/when-pulumi-met-nuke",{"title":144,"_path":145},"A year of learning and sharing - Dev Retro 2022","/posts/2022-retro",{"title":147,"_path":148},"Perform Dynamic Execution of an npm Package","/posts/pnpm-dlx",{"title":150,"_path":151},"Manage multiple Node.js versions","/posts/pnpm-env",{"title":153,"_path":154},"Introducing the Vue.js CI/CD series","/posts/vuecicd-introduction",{"title":156,"_path":157},"Execute commands using your project dependencies","/posts/pnpm-exec",{"title":159,"_path":160},"Vue.js CI/CD: Continuous Integration","/posts/vuecicd-ci",{"title":162,"_path":163},"Who is using pnpm?","/posts/pnpm-who-is-using",{"title":165,"_path":166},"Create an Azure-Ready GitHub Repository using Pulumi","/posts/azure-ready-github-repository",{"title":168,"_path":169},"Deploying to Azure from Azure DevOps without secrets","/posts/ado-workload-identity-federation",{"title":171,"_path":172},"Effortlessly Configure GitHub Repositories for Azure Deployment via OIDC","/posts/scripting-azure-ready-github-repository",{"title":174,"_path":175},"Playing with the .NET 8 Web API template","/posts/playing-with-dotnet8",{"title":177,"_path":178},"Another year of sharing and learning - Dev Retro 2023","/posts/2023-retro",{"title":180,"_path":181},"Week 4, 2024 - Tips I learned this week","/posts/w04-2024-tips-learned-this-week",{"title":183,"_path":184},"Using dependency injection with Azure .NET SDK","/posts/azure-sdk-di",{"title":186,"_path":187},"Having Fun With IT Event Calendars","/posts/it-event-calendars",{"title":189,"_path":190},"Call your Azure AD B2C protected API with authenticated HTTP requests from your JetBrains IDE","/posts/http-clients-oauth2","i-heroicons-newspaper",{"title":193,"_path":194,"children":195,"icon":199},"Goodies","/goodies",[196],{"title":197,"_path":198},"My Git Cheat Sheet","/goodies/gitcheatsheet","i-heroicons-gift-solid",{"title":201,"_path":202,"icon":203},"About","/about","i-heroicons-user-circle-solid",{"_path":70,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":69,"description":208,"lead":209,"date":210,"image":211,"badge":213,"tags":215,"body":222,"_type":1612,"_id":1613,"_source":1614,"_file":1615,"_extension":1616},"posts",false,"","In my previous articles about winget I talked about installing packages but I did not talk about producing packages for Windows Package Manager. So let's set things right.","Automate the upgrade of a winget package with GitHub Actions and Winget Create.","2021-08-25T00:00:00.000Z",{"src":212},"/images/surface_2.jpg",{"label":214},"Development",[216,217,218,219,220,221],"winget","wingetcreate","package manager","tooling","nushell","GitHub Actions",{"type":223,"children":224,"toc":1590},"root",[225,244,251,265,277,289,294,300,307,337,368,381,394,405,418,429,434,440,454,459,465,471,480,485,490,496,508,522,531,545,554,567,573,593,611,616,782,787,800,805,873,893,993,1005,1066,1071,1223,1232,1251,1260,1265,1274,1280,1294,1523,1528,1537,1543,1548,1553,1584],{"type":226,"tag":227,"props":228,"children":229},"element","p",{},[230,233,242],{"type":231,"value":232},"text","In my ",{"type":226,"tag":234,"props":235,"children":239},"a",{"href":236,"rel":237},"https://www.techwatching.dev/tags/winget",[238],"nofollow",[240],{"type":231,"value":241},"previous articles about winget",{"type":231,"value":243}," I talked about installing packages but I did not talk about producing packages for Windows Package Manager. So let's set things right.",{"type":226,"tag":245,"props":246,"children":248},"h2",{"id":247},"about-winget-packages",[249],{"type":231,"value":250},"About winget packages",{"type":226,"tag":227,"props":252,"children":253},{},[254,256,263],{"type":231,"value":255},"Windows Package Manager allows you to search and install applications that are referenced by the sources you have configured to be used by the winget tool. Sources are repositories that list applications that can be installed by winget and the data needed for them to be installed (in the form of a manifest file containing information such as the installer location of a package for instance). The default source is the ",{"type":226,"tag":234,"props":257,"children":260},{"href":258,"rel":259},"https://github.com/microsoft/winget-pkgs",[238],[261],{"type":231,"value":262},"Windows Package Manager Community Repository",{"type":231,"value":264}," which is a public GitHub repository where everyone can submit their application package manifest to make an application available for installation to Windows Package Manager users.",{"type":226,"tag":227,"props":266,"children":267},{},[268],{"type":226,"tag":269,"props":270,"children":276},"img",{"alt":271,"className":272,"src":275},"Windows Package Manager Community repository readme.",[273,274],"rounded-lg","mx-auto","/posts/images/wingetcreate_package_repository.png",[],{"type":226,"tag":227,"props":278,"children":279},{},[280,282],{"type":231,"value":281},"Once you know that, if you are the developer of an application you want to distribute on Windows through the Windows Package Manager you have to create a manifest for your application and publish it through a Pull Request on the Windows Package Manager Community Repository. And each time you release a new version of your application, you have to update your app manifest with the information of your new package version (new version number, new installer location...) and create a PR to the Windows Package Manager Community Repository with this updated version of your manifest. For more details, you can have a look at the official ",{"type":226,"tag":234,"props":283,"children":286},{"href":284,"rel":285},"https://docs.microsoft.com/en-us/windows/package-manager/package/",[238],[287],{"type":231,"value":288},"documentation",{"type":226,"tag":227,"props":290,"children":291},{},[292],{"type":231,"value":293},"As a package creator, you probably do not want to create and update this app manifest manually. Luckily for you, there is a tool to do that for you.",{"type":226,"tag":245,"props":295,"children":297},{"id":296},"wingetcreate-to-the-rescue",[298],{"type":231,"value":299},"WingetCreate to the rescue",{"type":226,"tag":301,"props":302,"children":304},"h3",{"id":303},"introducing-wingetcreate",[305],{"type":231,"value":306},"Introducing WingetCreate",{"type":226,"tag":227,"props":308,"children":309},{},[310,317,319,326,328,335],{"type":226,"tag":234,"props":311,"children":314},{"href":312,"rel":313},"https://github.com/microsoft/winget-create",[238],[315],{"type":231,"value":316},"Windows Package Manager Manifest Creator",{"type":231,"value":318}," aka WingetCreate is a tool \"designed to help generate or update manifest files for the Community repo\" (quoting the readme of WingetCreate repository). At the time of writing it is still in preview but you can already use it to help you with your manifest files. You can download the installer from ",{"type":226,"tag":234,"props":320,"children":323},{"href":321,"rel":322},"https://aka.ms/wingetcreate/latest",[238],[324],{"type":231,"value":325},"this link",{"type":231,"value":327}," but of course, it is available from winget: ",{"type":226,"tag":329,"props":330,"children":332},"code",{"className":331},[],[333],{"type":231,"value":334},"winget install wingetcreate",{"type":231,"value":336},".",{"type":226,"tag":227,"props":338,"children":339},{},[340,342,349,351,358,360,367],{"type":231,"value":341},"The main commands are ",{"type":226,"tag":234,"props":343,"children":346},{"href":344,"rel":345},"https://github.com/microsoft/winget-create/blob/main/doc/new.md",[238],[347],{"type":231,"value":348},"New",{"type":231,"value":350},", ",{"type":226,"tag":234,"props":352,"children":355},{"href":353,"rel":354},"https://github.com/microsoft/winget-create/blob/main/doc/update.md",[238],[356],{"type":231,"value":357},"Update",{"type":231,"value":359}," and ",{"type":226,"tag":234,"props":361,"children":364},{"href":362,"rel":363},"https://github.com/microsoft/winget-create/blob/main/doc/submit.md",[238],[365],{"type":231,"value":366},"Submit",{"type":231,"value":336},{"type":226,"tag":301,"props":369,"children":371},{"id":370},"the-new-command",[372,374,379],{"type":231,"value":373},"The ",{"type":226,"tag":329,"props":375,"children":377},{"className":376},[],[378],{"type":231,"value":348},{"type":231,"value":380}," command",{"type":226,"tag":227,"props":382,"children":383},{},[384,386,392],{"type":231,"value":385},"It allows you to create a new manifest from scratch. If you don't know where to start to deal with manifest files it is a nice way of getting started. Yet having a look at existing manifests in the ",{"type":226,"tag":234,"props":387,"children":389},{"href":258,"rel":388},[238],[390],{"type":231,"value":391},"winget community repository",{"type":231,"value":393}," can be sometimes more efficient.",{"type":226,"tag":301,"props":395,"children":397},{"id":396},"the-update-command",[398,399,404],{"type":231,"value":373},{"type":226,"tag":329,"props":400,"children":402},{"className":401},[],[403],{"type":231,"value":357},{"type":231,"value":380},{"type":226,"tag":227,"props":406,"children":407},{},[408,410,416],{"type":231,"value":409},"It allows you to update an existing manifest, that is to say, to create an updated version of your manifest when you have released a new version of your application (so new version number and new installer URL). You can use this command to ",{"type":226,"tag":329,"props":411,"children":413},{"className":412},[],[414],{"type":231,"value":415},"submit",{"type":231,"value":417}," your updated package to the Windows Package Manager Community Repository. In my opinion, it is the most useful command from WingetCreate as it can be easily be integrated into a build pipeline to publish your installer.",{"type":226,"tag":301,"props":419,"children":421},{"id":420},"the-submit-command",[422,423,428],{"type":231,"value":373},{"type":226,"tag":329,"props":424,"children":426},{"className":425},[],[427],{"type":231,"value":366},{"type":231,"value":380},{"type":226,"tag":227,"props":430,"children":431},{},[432],{"type":231,"value":433},"It allows you to submit an existing manifest (you created earlier on disk with the create or update command) to the Windows Package Manager Community Repository automatically. Basically, what it does is that it uses the GitHub personal access token you give it to create a Pull Request with your manifest in this repository.",{"type":226,"tag":301,"props":435,"children":437},{"id":436},"what-else",[438],{"type":231,"value":439},"What else?",{"type":226,"tag":227,"props":441,"children":442},{},[443,445,452],{"type":231,"value":444},"If you look at the ",{"type":226,"tag":234,"props":446,"children":449},{"href":447,"rel":448},"https://github.com/microsoft/winget-create/blob/main/doc/settings.md",[238],[450],{"type":231,"value":451},"settings command",{"type":231,"value":453}," you will see that you can specify the name of the GitHub repository to target for your package submission. This is interesting if you want to host a private source for winget available to your organization only where you will publish applications related to your business needs and that you don't want to make available publicly.",{"type":226,"tag":227,"props":455,"children":456},{},[457],{"type":231,"value":458},"WingetCreate is a really helpful tool to create, update and validate a manifest for your winget package. Still, you probably don't want to manually run WingetCreate each time you release a new package version. So let's see how to automate that with GitHub Actions.",{"type":226,"tag":245,"props":460,"children":462},{"id":461},"automating-your-app-manifest-upgrade-with-github-actions",[463],{"type":231,"value":464},"Automating your app manifest upgrade with GitHub Actions",{"type":226,"tag":301,"props":466,"children":468},{"id":467},"why-using-github-actions-to-demonstrate-the-automation-of-app-manifests-upgrades",[469],{"type":231,"value":470},"Why using GitHub Actions to demonstrate the automation of app manifests upgrades?",{"type":226,"tag":227,"props":472,"children":473},{},[474],{"type":226,"tag":269,"props":475,"children":479},{"alt":476,"className":477,"src":478},"GitHub Actions documentation.",[273,274],"/posts/images/wingetcreate_githubactions.png",[],{"type":226,"tag":227,"props":481,"children":482},{},[483],{"type":231,"value":484},"In my daily work, Azure Pipelines are the pipelines I used to do CI/CD and they are great. Currently, they offer more functionalities than GitHub Actions and as the code I develop is hosted in Azure Repos it makes more sense to use the Azure DevOps built-in CI/CD tool than something else (although Azure DevOps does not enforce at all you to choose their tools). However there is already in WingetCreate's readme a section with a link to an example about using WingetCreate with Azure Pipelines, but there is no example with GitHub Actions.",{"type":226,"tag":227,"props":486,"children":487},{},[488],{"type":231,"value":489},"Moreover, I think many applications that are available or will want to be available as a winget package are open source applications whose code are hosted in a GitHub repository and that are already using GitHub Actions for their CI/CD. So I thought it could be useful to have an example of using WingetCreate with GitHub Actions, especially as GitHub has this concept of \"releases\".",{"type":226,"tag":301,"props":491,"children":493},{"id":492},"an-interesting-use-case-for-with-nushell",[494],{"type":231,"value":495},"An interesting use case for with Nushell",{"type":226,"tag":227,"props":497,"children":498},{},[499,506],{"type":226,"tag":234,"props":500,"children":503},{"href":501,"rel":502},"https://www.nushell.sh/",[238],[504],{"type":231,"value":505},"Nushell",{"type":231,"value":507}," is a cross-platform shell written in Rust. Nushell's developers took the best of existing shells (like the structured data approach from PowerShell) and created a shell that feels modern, easy-to-use, and very useful in my opinion.",{"type":226,"tag":227,"props":509,"children":510},{},[511,513,520],{"type":231,"value":512},"There was a ",{"type":226,"tag":234,"props":514,"children":517},{"href":515,"rel":516},"https://github.com/nushell/nushell/issues/1859",[238],[518],{"type":231,"value":519},"GitHub issue",{"type":231,"value":521}," to support the new official Windows package manager so I though it was the opportunity to contribute to Nushell. Contributing to this project was something that I had not been able to do yet because I did not know Rust, writing CI/CD pipelines however is something I can do.",{"type":226,"tag":227,"props":523,"children":524},{},[525],{"type":226,"tag":269,"props":526,"children":530},{"alt":527,"className":528,"src":529},"Nushell documentation page.",[273,274],"/posts/images/wingetcreate_nushell.png",[],{"type":226,"tag":227,"props":532,"children":533},{},[534,536,543],{"type":231,"value":535},"Nushell already uses GitHub Actions for its continuous integration and to create releases. If you are not familiar with GitHub releases you can read the ",{"type":226,"tag":234,"props":537,"children":540},{"href":538,"rel":539},"https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/about-releases",[238],[541],{"type":231,"value":542},"official documentation",{"type":231,"value":544}," but basically a release is a version of your software (corresponding to a git tag in your repository) that you make available with release notes and binaries files.",{"type":226,"tag":227,"props":546,"children":547},{},[548],{"type":226,"tag":269,"props":549,"children":553},{"alt":550,"className":551,"src":552},"Nushell release page in GitHub.",[273,274],"/posts/images/wingetcreate_release.png",[],{"type":226,"tag":227,"props":555,"children":556},{},[557,559,565],{"type":231,"value":558},"Therefore, the idea was to update Nushell manifest with the latest version of Nushell using ",{"type":226,"tag":329,"props":560,"children":562},{"className":561},[],[563],{"type":231,"value":564},"WingetCreate",{"type":231,"value":566}," each time a new release of Nushell is published.",{"type":226,"tag":301,"props":568,"children":570},{"id":569},"triggering-a-new-workflow-from-a-release-event",[571],{"type":231,"value":572},"Triggering a new workflow from a release event",{"type":226,"tag":227,"props":574,"children":575},{},[576,578,584,586,591],{"type":231,"value":577},"Automating the app manifest upgrade of Nushell just meant creating a ",{"type":226,"tag":329,"props":579,"children":581},{"className":580},[],[582],{"type":231,"value":583},"job",{"type":231,"value":585}," in a GitHub Actions workflow that would call ",{"type":226,"tag":329,"props":587,"children":589},{"className":588},[],[590],{"type":231,"value":564},{"type":231,"value":592}," with the new version number and the new installer URL.",{"type":226,"tag":227,"props":594,"children":595},{},[596,598,603,605,610],{"type":231,"value":597},"I first wanted to modify the existing Nushell GitHub Actions workflow that was creating the releases by adding a new ",{"type":226,"tag":329,"props":599,"children":601},{"className":600},[],[602],{"type":231,"value":583},{"type":231,"value":604}," at the end of the workflow just after the release was created. Well this is was a bad idea, I pushed this change and during the next release of Nushell the workflow failed because I did not pay attention that the workflow was creating releases in draft, so the installer URL of the new version did not exist when my job called ",{"type":226,"tag":329,"props":606,"children":608},{"className":607},[],[609],{"type":231,"value":564},{"type":231,"value":336},{"type":226,"tag":227,"props":612,"children":613},{},[614],{"type":231,"value":615},"Because of that, I decided to create a separate workflow that would be triggered each time a Nushell release is published. In Nushell this is done manually (passing from draft to release) but even if it were done automatically by the release workflow I think it is a better idea to have a specific workflow triggered by the publication of a release.",{"type":226,"tag":617,"props":618,"children":622},"pre",{"className":619,"code":620,"language":621,"meta":207,"style":207},"language-yml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","name: Submit Nushell package to Windows Package Manager Community Repository \n\non:\n  release:\n    types: [published]\n\njobs:\n\n  winget:\n    name: Publish winget package\n","yml",[623],{"type":226,"tag":329,"props":624,"children":625},{"__ignoreMap":207},[626,656,666,681,694,722,730,743,751,764],{"type":226,"tag":627,"props":628,"children":631},"span",{"class":629,"line":630},"line",1,[632,638,644,650],{"type":226,"tag":627,"props":633,"children":635},{"style":634},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[636],{"type":231,"value":637},"name",{"type":226,"tag":627,"props":639,"children":641},{"style":640},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[642],{"type":231,"value":643},":",{"type":226,"tag":627,"props":645,"children":647},{"style":646},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[648],{"type":231,"value":649}," Submit Nushell package to Windows Package Manager Community Repository",{"type":226,"tag":627,"props":651,"children":653},{"style":652},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[654],{"type":231,"value":655}," \n",{"type":226,"tag":627,"props":657,"children":659},{"class":629,"line":658},2,[660],{"type":226,"tag":627,"props":661,"children":663},{"emptyLinePlaceholder":662},true,[664],{"type":231,"value":665},"\n",{"type":226,"tag":627,"props":667,"children":669},{"class":629,"line":668},3,[670,676],{"type":226,"tag":627,"props":671,"children":673},{"style":672},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[674],{"type":231,"value":675},"on",{"type":226,"tag":627,"props":677,"children":678},{"style":640},[679],{"type":231,"value":680},":\n",{"type":226,"tag":627,"props":682,"children":684},{"class":629,"line":683},4,[685,690],{"type":226,"tag":627,"props":686,"children":687},{"style":634},[688],{"type":231,"value":689},"  release",{"type":226,"tag":627,"props":691,"children":692},{"style":640},[693],{"type":231,"value":680},{"type":226,"tag":627,"props":695,"children":697},{"class":629,"line":696},5,[698,703,707,712,717],{"type":226,"tag":627,"props":699,"children":700},{"style":634},[701],{"type":231,"value":702},"    types",{"type":226,"tag":627,"props":704,"children":705},{"style":640},[706],{"type":231,"value":643},{"type":226,"tag":627,"props":708,"children":709},{"style":640},[710],{"type":231,"value":711}," [",{"type":226,"tag":627,"props":713,"children":714},{"style":646},[715],{"type":231,"value":716},"published",{"type":226,"tag":627,"props":718,"children":719},{"style":640},[720],{"type":231,"value":721},"]\n",{"type":226,"tag":627,"props":723,"children":725},{"class":629,"line":724},6,[726],{"type":226,"tag":627,"props":727,"children":728},{"emptyLinePlaceholder":662},[729],{"type":231,"value":665},{"type":226,"tag":627,"props":731,"children":733},{"class":629,"line":732},7,[734,739],{"type":226,"tag":627,"props":735,"children":736},{"style":634},[737],{"type":231,"value":738},"jobs",{"type":226,"tag":627,"props":740,"children":741},{"style":640},[742],{"type":231,"value":680},{"type":226,"tag":627,"props":744,"children":746},{"class":629,"line":745},8,[747],{"type":226,"tag":627,"props":748,"children":749},{"emptyLinePlaceholder":662},[750],{"type":231,"value":665},{"type":226,"tag":627,"props":752,"children":754},{"class":629,"line":753},9,[755,760],{"type":226,"tag":627,"props":756,"children":757},{"style":634},[758],{"type":231,"value":759},"  winget",{"type":226,"tag":627,"props":761,"children":762},{"style":640},[763],{"type":231,"value":680},{"type":226,"tag":627,"props":765,"children":767},{"class":629,"line":766},10,[768,773,777],{"type":226,"tag":627,"props":769,"children":770},{"style":634},[771],{"type":231,"value":772},"    name",{"type":226,"tag":627,"props":774,"children":775},{"style":640},[776],{"type":231,"value":643},{"type":226,"tag":627,"props":778,"children":779},{"style":646},[780],{"type":231,"value":781}," Publish winget package\n",{"type":226,"tag":227,"props":783,"children":784},{},[785],{"type":231,"value":786},"I like how it is possible with GitHub Actions to trigger on many different GitHub events. It is something that seems more limited in Azure Pipelines.",{"type":226,"tag":301,"props":788,"children":790},{"id":789},"calling-wingetcreate-from-a-github-actions-workflow",[791,793,798],{"type":231,"value":792},"Calling ",{"type":226,"tag":329,"props":794,"children":796},{"className":795},[],[797],{"type":231,"value":564},{"type":231,"value":799}," from a GitHub Actions workflow.",{"type":226,"tag":227,"props":801,"children":802},{},[803],{"type":231,"value":804},"Windows Package Manager Manifest Creator needs to be run in windows so we need to specify that in the job that will submit a new version of Nushell package to Windows Package Manager Community Repository:",{"type":226,"tag":617,"props":806,"children":808},{"className":619,"code":807,"language":621,"meta":207,"style":207},"jobs:\n\n  winget:\n    name: Publish winget package\n    runs-on: windows-latest\n",[809],{"type":226,"tag":329,"props":810,"children":811},{"__ignoreMap":207},[812,823,830,841,856],{"type":226,"tag":627,"props":813,"children":814},{"class":629,"line":630},[815,819],{"type":226,"tag":627,"props":816,"children":817},{"style":634},[818],{"type":231,"value":738},{"type":226,"tag":627,"props":820,"children":821},{"style":640},[822],{"type":231,"value":680},{"type":226,"tag":627,"props":824,"children":825},{"class":629,"line":658},[826],{"type":226,"tag":627,"props":827,"children":828},{"emptyLinePlaceholder":662},[829],{"type":231,"value":665},{"type":226,"tag":627,"props":831,"children":832},{"class":629,"line":668},[833,837],{"type":226,"tag":627,"props":834,"children":835},{"style":634},[836],{"type":231,"value":759},{"type":226,"tag":627,"props":838,"children":839},{"style":640},[840],{"type":231,"value":680},{"type":226,"tag":627,"props":842,"children":843},{"class":629,"line":683},[844,848,852],{"type":226,"tag":627,"props":845,"children":846},{"style":634},[847],{"type":231,"value":772},{"type":226,"tag":627,"props":849,"children":850},{"style":640},[851],{"type":231,"value":643},{"type":226,"tag":627,"props":853,"children":854},{"style":646},[855],{"type":231,"value":781},{"type":226,"tag":627,"props":857,"children":858},{"class":629,"line":696},[859,864,868],{"type":226,"tag":627,"props":860,"children":861},{"style":634},[862],{"type":231,"value":863},"    runs-on",{"type":226,"tag":627,"props":865,"children":866},{"style":640},[867],{"type":231,"value":643},{"type":226,"tag":627,"props":869,"children":870},{"style":646},[871],{"type":231,"value":872}," windows-latest\n",{"type":226,"tag":227,"props":874,"children":875},{},[876,878,883,885,891],{"type":231,"value":877},"This job will only contain one step that is the execution of the commands to call ",{"type":226,"tag":329,"props":879,"children":881},{"className":880},[],[882],{"type":231,"value":564},{"type":231,"value":884},". These commands will be in PowerShell as this is the default runner (",{"type":226,"tag":329,"props":886,"children":888},{"className":887},[],[889],{"type":231,"value":890},"pwsh",{"type":231,"value":892},") in a windows job.",{"type":226,"tag":617,"props":894,"children":896},{"className":619,"code":895,"language":621,"meta":207,"style":207},"  winget:\n    name: Publish winget package\n    runs-on: windows-latest\n    steps:\n      - name: Submit package to Windows Package Manager Community Repository\n        run: |\n\n",[897],{"type":226,"tag":329,"props":898,"children":899},{"__ignoreMap":207},[900,911,926,941,953,975],{"type":226,"tag":627,"props":901,"children":902},{"class":629,"line":630},[903,907],{"type":226,"tag":627,"props":904,"children":905},{"style":634},[906],{"type":231,"value":759},{"type":226,"tag":627,"props":908,"children":909},{"style":640},[910],{"type":231,"value":680},{"type":226,"tag":627,"props":912,"children":913},{"class":629,"line":658},[914,918,922],{"type":226,"tag":627,"props":915,"children":916},{"style":634},[917],{"type":231,"value":772},{"type":226,"tag":627,"props":919,"children":920},{"style":640},[921],{"type":231,"value":643},{"type":226,"tag":627,"props":923,"children":924},{"style":646},[925],{"type":231,"value":781},{"type":226,"tag":627,"props":927,"children":928},{"class":629,"line":668},[929,933,937],{"type":226,"tag":627,"props":930,"children":931},{"style":634},[932],{"type":231,"value":863},{"type":226,"tag":627,"props":934,"children":935},{"style":640},[936],{"type":231,"value":643},{"type":226,"tag":627,"props":938,"children":939},{"style":646},[940],{"type":231,"value":872},{"type":226,"tag":627,"props":942,"children":943},{"class":629,"line":683},[944,949],{"type":226,"tag":627,"props":945,"children":946},{"style":634},[947],{"type":231,"value":948},"    steps",{"type":226,"tag":627,"props":950,"children":951},{"style":640},[952],{"type":231,"value":680},{"type":226,"tag":627,"props":954,"children":955},{"class":629,"line":696},[956,961,966,970],{"type":226,"tag":627,"props":957,"children":958},{"style":640},[959],{"type":231,"value":960},"      -",{"type":226,"tag":627,"props":962,"children":963},{"style":634},[964],{"type":231,"value":965}," name",{"type":226,"tag":627,"props":967,"children":968},{"style":640},[969],{"type":231,"value":643},{"type":226,"tag":627,"props":971,"children":972},{"style":646},[973],{"type":231,"value":974}," Submit package to Windows Package Manager Community Repository\n",{"type":226,"tag":627,"props":976,"children":977},{"class":629,"line":724},[978,983,987],{"type":226,"tag":627,"props":979,"children":980},{"style":634},[981],{"type":231,"value":982},"        run",{"type":226,"tag":627,"props":984,"children":985},{"style":640},[986],{"type":231,"value":643},{"type":226,"tag":627,"props":988,"children":990},{"style":989},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[991],{"type":231,"value":992}," |\n",{"type":226,"tag":227,"props":994,"children":995},{},[996,998,1003],{"type":231,"value":997},"First, we need to download the latest version of ",{"type":226,"tag":329,"props":999,"children":1001},{"className":1000},[],[1002],{"type":231,"value":564},{"type":231,"value":1004}," by using the following command :",{"type":226,"tag":617,"props":1006,"children":1010},{"className":1007,"code":1008,"language":1009,"meta":207,"style":207},"language-powershell shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe\n","powershell",[1011],{"type":226,"tag":329,"props":1012,"children":1013},{"__ignoreMap":207},[1014],{"type":226,"tag":627,"props":1015,"children":1016},{"class":629,"line":630},[1017,1022,1027,1032,1037,1041,1045,1050,1055,1060],{"type":226,"tag":627,"props":1018,"children":1019},{"style":652},[1020],{"type":231,"value":1021},"iwr https:",{"type":226,"tag":627,"props":1023,"children":1024},{"style":640},[1025],{"type":231,"value":1026},"//",{"type":226,"tag":627,"props":1028,"children":1029},{"style":652},[1030],{"type":231,"value":1031},"aka.ms",{"type":226,"tag":627,"props":1033,"children":1034},{"style":640},[1035],{"type":231,"value":1036},"/",{"type":226,"tag":627,"props":1038,"children":1039},{"style":652},[1040],{"type":231,"value":217},{"type":226,"tag":627,"props":1042,"children":1043},{"style":640},[1044],{"type":231,"value":1036},{"type":226,"tag":627,"props":1046,"children":1047},{"style":652},[1048],{"type":231,"value":1049},"latest ",{"type":226,"tag":627,"props":1051,"children":1052},{"style":640},[1053],{"type":231,"value":1054},"-",{"type":226,"tag":627,"props":1056,"children":1057},{"style":652},[1058],{"type":231,"value":1059},"OutFile ",{"type":226,"tag":627,"props":1061,"children":1063},{"style":1062},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1064],{"type":231,"value":1065},"wingetcreate.exe\n",{"type":226,"tag":227,"props":1067,"children":1068},{},[1069],{"type":231,"value":1070},"Second, we want to retrieve the version number and the installer URL of the new package. These 2 pieces of information will be needed as parameters to the WingetCreate update command. We can find these in the GitHub context which contains the release event that triggered the workflow. We are using these 2 lines of PowerShell to get assets associated with the release and filter on the msi file which is the Windows installer of Nushell.",{"type":226,"tag":617,"props":1072,"children":1074},{"className":1007,"code":1073,"language":1009,"meta":207,"style":207},"$github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json\n$installerUrl = $github.release.assets | Where-Object -Property name -match 'windows.msi' | Select -ExpandProperty browser_download_url -First 1\n",[1075],{"type":226,"tag":329,"props":1076,"children":1077},{"__ignoreMap":207},[1078,1126],{"type":226,"tag":627,"props":1079,"children":1080},{"class":629,"line":630},[1081,1086,1091,1096,1101,1106,1111,1116,1121],{"type":226,"tag":627,"props":1082,"children":1083},{"style":640},[1084],{"type":231,"value":1085},"$",{"type":226,"tag":627,"props":1087,"children":1088},{"style":652},[1089],{"type":231,"value":1090},"github ",{"type":226,"tag":627,"props":1092,"children":1093},{"style":640},[1094],{"type":231,"value":1095},"=",{"type":226,"tag":627,"props":1097,"children":1098},{"style":1062},[1099],{"type":231,"value":1100}," Get-Content",{"type":226,"tag":627,"props":1102,"children":1103},{"style":640},[1104],{"type":231,"value":1105}," '",{"type":226,"tag":627,"props":1107,"children":1108},{"style":646},[1109],{"type":231,"value":1110},"${{ github.event_path }}",{"type":226,"tag":627,"props":1112,"children":1113},{"style":640},[1114],{"type":231,"value":1115},"'",{"type":226,"tag":627,"props":1117,"children":1118},{"style":640},[1119],{"type":231,"value":1120}," |",{"type":226,"tag":627,"props":1122,"children":1123},{"style":1062},[1124],{"type":231,"value":1125}," ConvertFrom-Json\n",{"type":226,"tag":627,"props":1127,"children":1128},{"class":629,"line":658},[1129,1133,1138,1142,1147,1152,1157,1162,1167,1172,1177,1181,1186,1190,1194,1199,1203,1208,1212,1217],{"type":226,"tag":627,"props":1130,"children":1131},{"style":640},[1132],{"type":231,"value":1085},{"type":226,"tag":627,"props":1134,"children":1135},{"style":652},[1136],{"type":231,"value":1137},"installerUrl ",{"type":226,"tag":627,"props":1139,"children":1140},{"style":640},[1141],{"type":231,"value":1095},{"type":226,"tag":627,"props":1143,"children":1144},{"style":640},[1145],{"type":231,"value":1146}," $",{"type":226,"tag":627,"props":1148,"children":1149},{"style":652},[1150],{"type":231,"value":1151},"github.release.assets ",{"type":226,"tag":627,"props":1153,"children":1154},{"style":640},[1155],{"type":231,"value":1156},"|",{"type":226,"tag":627,"props":1158,"children":1159},{"style":1062},[1160],{"type":231,"value":1161}," Where-Object",{"type":226,"tag":627,"props":1163,"children":1164},{"style":640},[1165],{"type":231,"value":1166}," -",{"type":226,"tag":627,"props":1168,"children":1169},{"style":652},[1170],{"type":231,"value":1171},"Property name ",{"type":226,"tag":627,"props":1173,"children":1174},{"style":640},[1175],{"type":231,"value":1176},"-match",{"type":226,"tag":627,"props":1178,"children":1179},{"style":640},[1180],{"type":231,"value":1105},{"type":226,"tag":627,"props":1182,"children":1183},{"style":646},[1184],{"type":231,"value":1185},"windows.msi",{"type":226,"tag":627,"props":1187,"children":1188},{"style":640},[1189],{"type":231,"value":1115},{"type":226,"tag":627,"props":1191,"children":1192},{"style":640},[1193],{"type":231,"value":1120},{"type":226,"tag":627,"props":1195,"children":1196},{"style":652},[1197],{"type":231,"value":1198}," Select ",{"type":226,"tag":627,"props":1200,"children":1201},{"style":640},[1202],{"type":231,"value":1054},{"type":226,"tag":627,"props":1204,"children":1205},{"style":652},[1206],{"type":231,"value":1207},"ExpandProperty browser_download_url ",{"type":226,"tag":627,"props":1209,"children":1210},{"style":640},[1211],{"type":231,"value":1054},{"type":226,"tag":627,"props":1213,"children":1214},{"style":652},[1215],{"type":231,"value":1216},"First ",{"type":226,"tag":627,"props":1218,"children":1220},{"style":1219},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1221],{"type":231,"value":1222},"1\n",{"type":226,"tag":1224,"props":1225,"children":1226},"blockquote",{},[1227],{"type":226,"tag":227,"props":1228,"children":1229},{},[1230],{"type":231,"value":1231},"💡 I just thought that instead of doing this in PowerShell we could have done this in Nushell, which would have been fun 'using Nushell to provide a new version of Nushell' but as it is not installed by default on windows agents it would mean a loss of time each time the workflow runs.",{"type":226,"tag":227,"props":1233,"children":1234},{},[1235,1237,1242,1244,1249],{"type":231,"value":1236},"Third, we can call the ",{"type":226,"tag":329,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":231,"value":564},{"type":231,"value":1243}," update command by specifying the version, the URL of the installer, and a Personal Access Token that will be used by ",{"type":226,"tag":329,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":231,"value":564},{"type":231,"value":1250}," to make the Pull Request in the Windows Package Manager Community Repository. This PAT needs to be created by a maintainer of the repository with permission and added to the secrets of the project.",{"type":226,"tag":227,"props":1252,"children":1253},{},[1254],{"type":226,"tag":269,"props":1255,"children":1259},{"alt":1256,"className":1257,"src":1258},"Screen to define Personal Access Tokens.",[273,274],"/posts/images/wingetcreate_pat.png",[],{"type":226,"tag":227,"props":1261,"children":1262},{},[1263],{"type":231,"value":1264},"Here you can see a run of the workflow in GitHub:",{"type":226,"tag":227,"props":1266,"children":1267},{},[1268],{"type":226,"tag":269,"props":1269,"children":1273},{"alt":1270,"className":1271,"src":1272},"GitHub Actions workflow running.",[273,274],"/posts/images/wingetcreate_wokflow_1.png",[],{"type":226,"tag":245,"props":1275,"children":1277},{"id":1276},"overview-of-the-created-workflow",[1278],{"type":231,"value":1279},"Overview of the created workflow",{"type":226,"tag":227,"props":1281,"children":1282},{},[1283,1285,1292],{"type":231,"value":1284},"You can find the complete workflow below and ",{"type":226,"tag":234,"props":1286,"children":1289},{"href":1287,"rel":1288},"https://github.com/nushell/nushell/blob/main/.github/workflows/winget-submission.yml",[238],[1290],{"type":231,"value":1291},"here",{"type":231,"value":1293}," in the Nushell repository.",{"type":226,"tag":617,"props":1295,"children":1297},{"className":619,"code":1296,"language":621,"meta":207,"style":207},"name: Submit Nushell package to Windows Package Manager Community Repository \n\non:\n  release:\n    types: [published]\n\njobs:\n\n  winget:\n    name: Publish winget package\n    runs-on: windows-latest\n    steps:\n      - name: Submit package to Windows Package Manager Community Repository\n        run: |\n          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe\n          $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json\n          $installerUrl = $github.release.assets | Where-Object -Property name -match 'windows.msi' | Select -ExpandProperty browser_download_url -First 1\n          .\\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}\n",[1298],{"type":226,"tag":329,"props":1299,"children":1300},{"__ignoreMap":207},[1301,1320,1327,1338,1349,1372,1379,1390,1397,1408,1423,1439,1451,1471,1487,1496,1505,1514],{"type":226,"tag":627,"props":1302,"children":1303},{"class":629,"line":630},[1304,1308,1312,1316],{"type":226,"tag":627,"props":1305,"children":1306},{"style":634},[1307],{"type":231,"value":637},{"type":226,"tag":627,"props":1309,"children":1310},{"style":640},[1311],{"type":231,"value":643},{"type":226,"tag":627,"props":1313,"children":1314},{"style":646},[1315],{"type":231,"value":649},{"type":226,"tag":627,"props":1317,"children":1318},{"style":652},[1319],{"type":231,"value":655},{"type":226,"tag":627,"props":1321,"children":1322},{"class":629,"line":658},[1323],{"type":226,"tag":627,"props":1324,"children":1325},{"emptyLinePlaceholder":662},[1326],{"type":231,"value":665},{"type":226,"tag":627,"props":1328,"children":1329},{"class":629,"line":668},[1330,1334],{"type":226,"tag":627,"props":1331,"children":1332},{"style":672},[1333],{"type":231,"value":675},{"type":226,"tag":627,"props":1335,"children":1336},{"style":640},[1337],{"type":231,"value":680},{"type":226,"tag":627,"props":1339,"children":1340},{"class":629,"line":683},[1341,1345],{"type":226,"tag":627,"props":1342,"children":1343},{"style":634},[1344],{"type":231,"value":689},{"type":226,"tag":627,"props":1346,"children":1347},{"style":640},[1348],{"type":231,"value":680},{"type":226,"tag":627,"props":1350,"children":1351},{"class":629,"line":696},[1352,1356,1360,1364,1368],{"type":226,"tag":627,"props":1353,"children":1354},{"style":634},[1355],{"type":231,"value":702},{"type":226,"tag":627,"props":1357,"children":1358},{"style":640},[1359],{"type":231,"value":643},{"type":226,"tag":627,"props":1361,"children":1362},{"style":640},[1363],{"type":231,"value":711},{"type":226,"tag":627,"props":1365,"children":1366},{"style":646},[1367],{"type":231,"value":716},{"type":226,"tag":627,"props":1369,"children":1370},{"style":640},[1371],{"type":231,"value":721},{"type":226,"tag":627,"props":1373,"children":1374},{"class":629,"line":724},[1375],{"type":226,"tag":627,"props":1376,"children":1377},{"emptyLinePlaceholder":662},[1378],{"type":231,"value":665},{"type":226,"tag":627,"props":1380,"children":1381},{"class":629,"line":732},[1382,1386],{"type":226,"tag":627,"props":1383,"children":1384},{"style":634},[1385],{"type":231,"value":738},{"type":226,"tag":627,"props":1387,"children":1388},{"style":640},[1389],{"type":231,"value":680},{"type":226,"tag":627,"props":1391,"children":1392},{"class":629,"line":745},[1393],{"type":226,"tag":627,"props":1394,"children":1395},{"emptyLinePlaceholder":662},[1396],{"type":231,"value":665},{"type":226,"tag":627,"props":1398,"children":1399},{"class":629,"line":753},[1400,1404],{"type":226,"tag":627,"props":1401,"children":1402},{"style":634},[1403],{"type":231,"value":759},{"type":226,"tag":627,"props":1405,"children":1406},{"style":640},[1407],{"type":231,"value":680},{"type":226,"tag":627,"props":1409,"children":1410},{"class":629,"line":766},[1411,1415,1419],{"type":226,"tag":627,"props":1412,"children":1413},{"style":634},[1414],{"type":231,"value":772},{"type":226,"tag":627,"props":1416,"children":1417},{"style":640},[1418],{"type":231,"value":643},{"type":226,"tag":627,"props":1420,"children":1421},{"style":646},[1422],{"type":231,"value":781},{"type":226,"tag":627,"props":1424,"children":1426},{"class":629,"line":1425},11,[1427,1431,1435],{"type":226,"tag":627,"props":1428,"children":1429},{"style":634},[1430],{"type":231,"value":863},{"type":226,"tag":627,"props":1432,"children":1433},{"style":640},[1434],{"type":231,"value":643},{"type":226,"tag":627,"props":1436,"children":1437},{"style":646},[1438],{"type":231,"value":872},{"type":226,"tag":627,"props":1440,"children":1442},{"class":629,"line":1441},12,[1443,1447],{"type":226,"tag":627,"props":1444,"children":1445},{"style":634},[1446],{"type":231,"value":948},{"type":226,"tag":627,"props":1448,"children":1449},{"style":640},[1450],{"type":231,"value":680},{"type":226,"tag":627,"props":1452,"children":1454},{"class":629,"line":1453},13,[1455,1459,1463,1467],{"type":226,"tag":627,"props":1456,"children":1457},{"style":640},[1458],{"type":231,"value":960},{"type":226,"tag":627,"props":1460,"children":1461},{"style":634},[1462],{"type":231,"value":965},{"type":226,"tag":627,"props":1464,"children":1465},{"style":640},[1466],{"type":231,"value":643},{"type":226,"tag":627,"props":1468,"children":1469},{"style":646},[1470],{"type":231,"value":974},{"type":226,"tag":627,"props":1472,"children":1474},{"class":629,"line":1473},14,[1475,1479,1483],{"type":226,"tag":627,"props":1476,"children":1477},{"style":634},[1478],{"type":231,"value":982},{"type":226,"tag":627,"props":1480,"children":1481},{"style":640},[1482],{"type":231,"value":643},{"type":226,"tag":627,"props":1484,"children":1485},{"style":989},[1486],{"type":231,"value":992},{"type":226,"tag":627,"props":1488,"children":1490},{"class":629,"line":1489},15,[1491],{"type":226,"tag":627,"props":1492,"children":1493},{"style":646},[1494],{"type":231,"value":1495},"          iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe\n",{"type":226,"tag":627,"props":1497,"children":1499},{"class":629,"line":1498},16,[1500],{"type":226,"tag":627,"props":1501,"children":1502},{"style":646},[1503],{"type":231,"value":1504},"          $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json\n",{"type":226,"tag":627,"props":1506,"children":1508},{"class":629,"line":1507},17,[1509],{"type":226,"tag":627,"props":1510,"children":1511},{"style":646},[1512],{"type":231,"value":1513},"          $installerUrl = $github.release.assets | Where-Object -Property name -match 'windows.msi' | Select -ExpandProperty browser_download_url -First 1\n",{"type":226,"tag":627,"props":1515,"children":1517},{"class":629,"line":1516},18,[1518],{"type":226,"tag":627,"props":1519,"children":1520},{"style":646},[1521],{"type":231,"value":1522},"          .\\wingetcreate.exe update Nushell.Nushell -s -v $github.release.tag_name -u $installerUrl -t ${{ secrets.NUSHELL_PAT }}\n",{"type":226,"tag":227,"props":1524,"children":1525},{},[1526],{"type":231,"value":1527},"Here is what a Pull Request generated by the GitHub Actions workflow looks like:",{"type":226,"tag":227,"props":1529,"children":1530},{},[1531],{"type":226,"tag":269,"props":1532,"children":1536},{"alt":1533,"className":1534,"src":1535},"Pull Request in the winget-pkgs repository.",[273,274],"/posts/images/wingetcreate_pr.png",[],{"type":226,"tag":245,"props":1538,"children":1540},{"id":1539},"to-summarize",[1541],{"type":231,"value":1542},"To summarize",{"type":226,"tag":227,"props":1544,"children":1545},{},[1546],{"type":231,"value":1547},"We have introduced the notion of source for winget packages and in particular, the Windows Package Manager Community Repository where we can open PR to submit a new application or new versions of an existing application. We have seen how Windows Package Manager Manifest Creator could help us do that and how it could be automated from a GitHub Actions workflow like it was done for the Nushell project.",{"type":226,"tag":227,"props":1549,"children":1550},{},[1551],{"type":231,"value":1552},"Do not hesitate to copy some of the GitHub Actions workflows I showed you. I hope this will inspire you to do the same to distribute your applications through winget.",{"type":226,"tag":227,"props":1554,"children":1555},{},[1556,1558,1565,1567,1574,1575,1582],{"type":231,"value":1557},"A big thank you to ",{"type":226,"tag":234,"props":1559,"children":1562},{"href":1560,"rel":1561},"https://twitter.com/ethomson",[238],[1563],{"type":231,"value":1564},"Edward Thomson",{"type":231,"value":1566}," who explained to me how to retrieve GitHub Actions contexts in PowerShell. Thanks also to ",{"type":226,"tag":234,"props":1568,"children":1571},{"href":1569,"rel":1570},"https://twitter.com/fdncred",[238],[1572],{"type":231,"value":1573},"Darren Schroeder",{"type":231,"value":359},{"type":226,"tag":234,"props":1576,"children":1579},{"href":1577,"rel":1578},"https://twitter.com/jntrnr",[238],[1580],{"type":231,"value":1581},"Jonathan Turner",{"type":231,"value":1583}," who supported me to set up a workflow that publishes new releases of Nushell in winget.",{"type":226,"tag":1585,"props":1586,"children":1587},"style",{},[1588],{"type":231,"value":1589},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":207,"searchDepth":658,"depth":658,"links":1591},[1592,1593,1603,1610,1611],{"id":247,"depth":658,"text":250},{"id":296,"depth":658,"text":299,"children":1594},[1595,1596,1598,1600,1602],{"id":303,"depth":668,"text":306},{"id":370,"depth":668,"text":1597},"The New command",{"id":396,"depth":668,"text":1599},"The Update command",{"id":420,"depth":668,"text":1601},"The Submit command",{"id":436,"depth":668,"text":439},{"id":461,"depth":658,"text":464,"children":1604},[1605,1606,1607,1608],{"id":467,"depth":668,"text":470},{"id":492,"depth":668,"text":495},{"id":569,"depth":668,"text":572},{"id":789,"depth":668,"text":1609},"Calling WingetCreate from a GitHub Actions workflow.",{"id":1276,"depth":658,"text":1279},{"id":1539,"depth":658,"text":1542},"markdown","content:1.posts:21.wingetcreate.md","content","1.posts/21.wingetcreate.md","md",[1618,1630],{"_path":73,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":72,"description":1619,"date":1620,"image":1621,"badge":1623,"tags":1625,"_type":1612,"_id":1628,"_source":1614,"_file":1629,"_extension":1616},"I recently played a bit with GitHub Actions and as I have spent some time running, again and again, my workflows to understand what was going wrong I thought it could be interesting to share what I have learned especially concerning environment variables and contexts.","2021-09-06T00:00:00.000Z",{"src":1622},"/images/github-figurine_1.jpg",{"label":1624},"Tips",[1626,221,1627],"PowerShell","jq","content:1.posts:22.github-actions-var-and-context.md","1.posts/22.github-actions-var-and-context.md",{"_path":67,"_dir":205,"_draft":206,"_partial":206,"_locale":207,"title":66,"description":1631,"lead":1632,"date":1633,"image":1634,"badge":1636,"tags":1637,"_type":1612,"_id":1644,"_source":1614,"_file":1645,"_extension":1616},"In Microsoft.Data.SqlClient v3.0.0, a new authentication mode Active Directory Default has been released. Let's see what this means when querying an Azure SQL Database from some C# code.","Talking about Active Directory Default authentication mode for SqlClient.","2021-06-22T00:00:00.000Z",{"src":1635},"/images/cloud-azure_1.jpg",{"label":214},[1638,1639,1640,1641,1642,1643],"Azure Active Directory","Azure SQL Database","Azure SDK","Azure","Azure CLI","ASP.NET Core","content:1.posts:20.sqlclient-active-directory-authent.md","1.posts/20.sqlclient-active-directory-authent.md",1716749601635]