Skip to content

Commit 716672d

Browse files
committed
Cleaning repo
1 parent 6199fff commit 716672d

11 files changed

Lines changed: 332 additions & 14 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @michaeljolley

.github/CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
The Code of Conduct for this repository can be found at <https://bbb.dev/coc>

.github/CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing
2+
3+
We appreciate contributions of any kind and acknowledge them on our
4+
[README][readme]. By participating in this project, you agree to abide by our
5+
[code of conduct](CODE_OF_CONDUCT.md).
6+
7+
## How Can You Contribute?
8+
9+
### Find a bug? See room for improvement?
10+
11+
Add an issue. We'll review it, add labels and reply within a few days.
12+
13+
### Want to work on an issue?
14+
15+
Comment on the issue that you'd like to work on it and we'll assign it to you.
16+
If the issue is assigned to someone else already, you might want to ask the
17+
contributor if they'd like some help.
18+
19+
### Documentation/etc need updating?
20+
21+
Go right ahead! Just submit a pull request when you're done.
22+
23+
## Pull Requests
24+
25+
First, make sure you've forked the repository. Push to your fork and
26+
[submit a pull request](https://github.com/michaeljolley/cmdpalextensions/compare/)
27+
against the `main` branch.
28+
29+
At this point you're waiting on us. We like to at least comment on pull requests
30+
within three days (and, typically, one day). We may suggest some changes or
31+
improvements or alternatives.
32+
33+
> If you've made code changes, be sure to update or add any necessary tests. Also,
34+
> make sure that all tests pass.
35+
36+
### Code Reviews
37+
38+
You can often watch pull requests get reviewed live on Twitch at
39+
[https://twitch.tv/baldbeardedbuilder](https://twitch.tv/baldbeardedbuilder).
40+
41+
## Improve Your Odds of Getting Merged
42+
43+
Some things that will increase the chance that your pull request is accepted:
44+
45+
- Update [README][readme] with any needed changes
46+
- **Write/update tests.**
47+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
48+
49+
[readme]: https://github.com/MichaelJolley/cmdpalextensions/tree/main#readme

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These are supported funding model platforms
2+
3+
github: # [michaeljolley]
4+
patreon: # Replace with a single Patreon username
5+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ jobs:
2222
dotnet-version: 9.0.x
2323

2424
- name: Build
25-
run: dotnet build --configuration Release -p Platform=x64 -p GenerateAppxPackageOnBuild=true
25+
run: |
26+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=x64
27+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=arm64
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Publish Random Dad Jokes Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- "dadjokes/v*.*.*"
7+
8+
env:
9+
project: CmdPalRandomDadJokeExtension
10+
packageName: MichaelJolley.RandomDadJokesForCmdPal
11+
tag_prefix: "dadjokes/v"
12+
13+
jobs:
14+
build_sign_release:
15+
# This job builds the appx packages and signs them using the trusted signing service
16+
runs-on: windows-latest
17+
permissions:
18+
contents: write
19+
env:
20+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup .NET SDK
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: 9.0.x
28+
29+
- name: Update Version in manifest
30+
working-directory: "./src/${{ env.project }}"
31+
run: |
32+
$version = "${{github.ref_name}}.0" -replace '^${{ env.tag_prefix }}', ''
33+
34+
$xmlFilePath = "Package.appxmanifest"
35+
[xml]$xml = Get-Content $xmlFilePath
36+
$xml.Package.Identity.Version = $version
37+
$xml.Save($xmlFilePath)
38+
Write-Output "Version updated to $version in $xmlFilePath"
39+
40+
- name: Build
41+
run: |
42+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=x64
43+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=arm64
44+
45+
- name: Move misx Packages
46+
run: |
47+
# Move the misx packages to one folder for signing
48+
$msixs = Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -File -Filter "${{ env.project }}*.msix" -exclude "Microsoft.WindowsAppRuntime.*.msix"
49+
50+
# write the path of each msix (relative to the git root)
51+
Write-Host "Found the following msix's:"
52+
foreach($msix in $msixs) {
53+
Write-Host "*" $msix.Name "`n"
54+
}
55+
56+
$DestinationFolder = Join-Path $Env:GITHUB_WORKSPACE "tmp"
57+
58+
if(Test-Path $DestinationFolder) {
59+
Remove-Item -Path $DestinationFolder -Recurse -Force | Out-Null
60+
}
61+
if(-not (Test-Path $DestinationFolder)) {
62+
New-Item -ItemType Directory -Path $DestinationFolder -Force | Out-Null
63+
}
64+
65+
Write-Host "Copying msix's to $DestinationFolder..."
66+
67+
foreach($msix in $msixs) {
68+
Copy-Item -Path $msix -Destination $DestinationFolder -Force
69+
}
70+
71+
- name: Sign files with Trusted Signing
72+
uses: azure/trusted-signing-action@v0
73+
with:
74+
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
75+
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
76+
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
77+
endpoint: https://eus.codesigning.azure.net/
78+
trusted-signing-account-name: baldbeardedbuilder
79+
certificate-profile-name: baldbeardedbuilder
80+
files-folder: ${{ github.workspace }}\tmp # This is where the msix files are copied to for signing
81+
files-folder-filter: msix
82+
file-digest: SHA256
83+
timestamp-rfc3161: http://timestamp.acs.microsoft.com
84+
timestamp-digest: SHA256
85+
86+
- uses: ncipollo/release-action@v1
87+
name: Create Release
88+
with:
89+
artifacts: "${{ github.workspace }}/tmp/*.msix" # Path to the signed msix files to upload as artifacts for the release. Use glob pattern to match all files in the tmp folder.
90+
name: ${{ github.ref_name }}
91+
allowUpdates: true
92+
tag: ${{ github.ref_name }}
93+
94+
# publish:
95+
# runs-on: windows-latest
96+
# needs: build_sign_release
97+
# permissions:
98+
# packages: write
99+
# contents: write
100+
# steps:
101+
# - name: Submit extensions to Winget
102+
# run: |
103+
# $wingetPackage = "MichaelJolley.CmdPalRandomDadJokeExtension"
104+
# $gitToken = $Env:GITHUB_TOKEN
105+
106+
# $github = Invoke-RestMethod -uri "https://api.github.com/repos/michaeljolley/CmdPalExtensions/releases"
107+
# $targetRelease = $github | Where-Object -Property name -match 'Release'| Select -First 1
108+
# _0.0.4.0_x64.msix
109+
# $installerX64Url = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'CmdPalRandomDadJokeExtension*x64' | Select -ExpandProperty browser_download_url
110+
# # $installerArmUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'CmdPalRandomDadJokeExtension*arm64' | Select -ExpandProperty browser_download_url
111+
# $ver = $targetRelease.tag_name -ireplace '^v'
112+
113+
# # getting latest wingetcreate file
114+
# iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
115+
# .\wingetcreate.exe update $wingetPackage -s -v $ver -u "$installerX64Url|machine" -t $gitToken
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Publish Random Facts Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- "facts/v*.*.*"
7+
8+
env:
9+
project: CmdPalRandomFactsExtension
10+
packageName: MichaelJolley.RandomFactsForCmdPal
11+
tag_prefix: "facts/v"
12+
13+
jobs:
14+
build_sign_release:
15+
# This job builds the appx packages and signs them using the trusted signing service
16+
runs-on: windows-latest
17+
permissions:
18+
contents: write
19+
env:
20+
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup .NET SDK
25+
uses: actions/setup-dotnet@v4
26+
with:
27+
dotnet-version: 9.0.x
28+
29+
- name: Update Version in manifest
30+
working-directory: "./src/${{ env.project }}"
31+
run: |
32+
$version = "${{github.ref_name}}.0" -replace '^${{ env.tag_prefix }}', ''
33+
34+
$xmlFilePath = "Package.appxmanifest"
35+
[xml]$xml = Get-Content $xmlFilePath
36+
$xml.Package.Identity.Version = $version
37+
$xml.Save($xmlFilePath)
38+
Write-Output "Version updated to $version in $xmlFilePath"
39+
40+
- name: Build
41+
run: |
42+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=x64
43+
dotnet build --configuration Release -p:GenerateAppxPackageOnBuild=true -p:Platform=arm64
44+
45+
- name: Move misx Packages
46+
run: |
47+
# Move the misx packages to one folder for signing
48+
$msixs = Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -File -Filter "${{ env.project }}*.msix" -exclude "Microsoft.WindowsAppRuntime.*.msix"
49+
50+
# write the path of each msix (relative to the git root)
51+
Write-Host "Found the following msix's:"
52+
foreach($msix in $msixs) {
53+
Write-Host "*" $msix.Name "`n"
54+
}
55+
56+
$DestinationFolder = Join-Path $Env:GITHUB_WORKSPACE "tmp"
57+
58+
if(Test-Path $DestinationFolder) {
59+
Remove-Item -Path $DestinationFolder -Recurse -Force | Out-Null
60+
}
61+
if(-not (Test-Path $DestinationFolder)) {
62+
New-Item -ItemType Directory -Path $DestinationFolder -Force | Out-Null
63+
}
64+
65+
Write-Host "Copying msix's to $DestinationFolder..."
66+
67+
foreach($msix in $msixs) {
68+
Copy-Item -Path $msix -Destination $DestinationFolder -Force
69+
}
70+
71+
- name: Sign files with Trusted Signing
72+
uses: azure/trusted-signing-action@v0
73+
with:
74+
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
75+
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
76+
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
77+
endpoint: https://eus.codesigning.azure.net/
78+
trusted-signing-account-name: baldbeardedbuilder
79+
certificate-profile-name: baldbeardedbuilder
80+
files-folder: ${{ github.workspace }}\tmp # This is where the msix files are copied to for signing
81+
files-folder-filter: msix
82+
file-digest: SHA256
83+
timestamp-rfc3161: http://timestamp.acs.microsoft.com
84+
timestamp-digest: SHA256
85+
86+
- uses: ncipollo/release-action@v1
87+
name: Create Release
88+
with:
89+
artifacts: "${{ github.workspace }}/tmp/*.msix" # Path to the signed msix files to upload as artifacts for the release. Use glob pattern to match all files in the tmp folder.
90+
name: ${{ github.ref_name }}
91+
allowUpdates: true
92+
tag: ${{ github.ref_name }}
93+
94+
# publish:
95+
# runs-on: windows-latest
96+
# needs: build_sign_release
97+
# permissions:
98+
# packages: write
99+
# contents: write
100+
# steps:
101+
# - name: Submit extensions to Winget
102+
# run: |
103+
# $wingetPackage = "MichaelJolley.CmdPalRandomDadJokeExtension"
104+
# $gitToken = $Env:GITHUB_TOKEN
105+
106+
# $github = Invoke-RestMethod -uri "https://api.github.com/repos/michaeljolley/CmdPalExtensions/releases"
107+
# $targetRelease = $github | Where-Object -Property name -match 'Release'| Select -First 1
108+
# _0.0.4.0_x64.msix
109+
# $installerX64Url = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'CmdPalRandomDadJokeExtension*x64' | Select -ExpandProperty browser_download_url
110+
# # $installerArmUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'CmdPalRandomDadJokeExtension*arm64' | Select -ExpandProperty browser_download_url
111+
# $ver = $targetRelease.tag_name -ireplace '^v'
112+
113+
# # getting latest wingetcreate file
114+
# iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
115+
# .\wingetcreate.exe update $wingetPackage -s -v $ver -u "$installerX64Url|machine" -t $gitToken
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
name: Publish Release
1+
name: Publish Notion Extension
22

33
on:
44
push:
55
tags:
6-
- "v*.*.*"
6+
- "notion/v*.*.*"
7+
8+
env:
9+
project: CmdPalNotionExtension
10+
packageName: MichaelJolley.NotionForCmdPal
11+
tag_prefix: "notion/v"
712

813
jobs:
914
build_sign_release:
@@ -22,9 +27,9 @@ jobs:
2227
dotnet-version: 9.0.x
2328

2429
- name: Update Version in manifest
25-
working-directory: './src/CmdPalRandomDadJokeExtension'
30+
working-directory: "./src/${{ env.project }}"
2631
run: |
27-
$version = "${{github.ref_name}}.0" -replace '^v', ''
32+
$version = "${{github.ref_name}}.0" -replace '^${{ env.tag_prefix }}', ''
2833
2934
$xmlFilePath = "Package.appxmanifest"
3035
[xml]$xml = Get-Content $xmlFilePath
@@ -40,7 +45,7 @@ jobs:
4045
- name: Move misx Packages
4146
run: |
4247
# Move the misx packages to one folder for signing
43-
$msixs = Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -File -Filter "*.msix" -exclude "Microsoft.WindowsAppRuntime.*.msix"
48+
$msixs = Get-ChildItem -Path $Env:GITHUB_WORKSPACE -Recurse -File -Filter "${{ env.project }}*.msix" -exclude "Microsoft.WindowsAppRuntime.*.msix"
4449
4550
# write the path of each msix (relative to the git root)
4651
Write-Host "Found the following msix's:"
@@ -82,7 +87,7 @@ jobs:
8287
name: Create Release
8388
with:
8489
artifacts: "${{ github.workspace }}/tmp/*.msix" # Path to the signed msix files to upload as artifacts for the release. Use glob pattern to match all files in the tmp folder.
85-
name: Release ${{ github.ref_name }}
90+
name: ${{ github.ref_name }}
8691
allowUpdates: true
8792
tag: ${{ github.ref_name }}
8893

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.0.8" />
6+
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.1.0" />
77
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0-preview.24508.2" />
88
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2903.40" />
99
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
10-
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.1.5" />
11-
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1742" />
10+
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
11+
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
1212
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.7.250310001" />
1313
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
1414
</ItemGroup>

LICENSE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
MIT License
2-
3-
Copyright (c) 2025 Michael Jolley
1+
The MIT License (MIT)
2+
Copyright (c) 2025 Bald Bearded Builder, LLC
43

54
Permission is hereby granted, free of charge, to any person obtaining a copy
65
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)