Skip to content

Commit 4e99732

Browse files
committed
feat: add package action (#1)
Actions (#2) * add package action * add github token Actions (#3) * add package action * add github token * get token from secrets Actions (#4) * add package action * add github token * get token from secrets * fix unexpected token error Actions (#5) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator Actions (#6) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script Actions (#7) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive Update reusable-package.yml Update reusable-package.yml Actions (#8) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive * replace jq by powershell regex Update reusable-package.yml Actions (#9) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive * replace jq by powershell regex * add heat path Actions (#10) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive * replace jq by powershell regex * add heat path * remove extra character Actions (#11) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive * replace jq by powershell regex * add heat path * remove extra character * fix formatting error Update JetBrainsMonoNF.wixproj Actions (#12) * add package action * add github token * get token from secrets * fix unexpected token error * use call operator * execute individual commands instead of script * remove shell directive * replace jq by powershell regex * add heat path * remove extra character * fix formatting error * remove Fonts folder from project add release action (#13)
1 parent 2f6415a commit 4e99732

File tree

5 files changed

+49
-72
lines changed

5 files changed

+49
-72
lines changed

.github/workflows/package.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Package
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
jobs:
7+
package:
8+
uses: ./.github/workflows/reusable-package.yml

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
package:
6+
uses: ./.github/workflows/reusable-package.yml
7+
release:
8+
needs: package
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/download-artifact@v3
13+
- run: |
14+
tag=$(gh release view -R ryanoasis/nerd-fonts --json tagName -q '.tagName')
15+
gh release create "${tag}" --notes "JetBrainsMono Nerd Font ${tag}" ./build/*.msi
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Reusable package
2+
on:
3+
workflow_call:
4+
jobs:
5+
package:
6+
runs-on: windows-latest
7+
steps:
8+
- name: Add msbuild to PATH
9+
uses: microsoft/[email protected]
10+
- uses: actions/checkout@v3
11+
- name: Build package
12+
shell: pwsh
13+
run: ./Build-Installer.ps1
14+
env:
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
- uses: actions/upload-artifact@v3
17+
with:
18+
name: build
19+
path: JetBrainsMonoNF/bin/Release/*.msi
20+
if-no-files-found: error

Build-Installer.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
$ErrorActionPreference = 'Stop'
22

3-
$asset = gh release view `
4-
-R ryanoasis/nerd-fonts `
5-
--json assets `
6-
-q '.assets[].url|match("^.*JetBrainsMono.*$"; "g")|.string'
3+
(gh release view -R ryanoasis/nerd-fonts --json assets) `
4+
-match '(?<url>https://[^"]+?JetBrainsMono\.zip)"'
5+
$asset = $Matches.url
76

87
Invoke-WebRequest -Uri $asset -OutFile $PSScriptRoot\JetBrainsMono.zip
98
Remove-Item `

JetBrainsMonoNF/JetBrainsMonoNF.wixproj

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -25,83 +25,16 @@
2525
<Compile Include="Product.wxs" />
2626
</ItemGroup>
2727
<ItemGroup>
28-
<Content Include="Fonts\JetBrains Mono Bold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
29-
<Content Include="Fonts\JetBrains Mono Bold Italic Nerd Font Complete Windows Compatible.ttf" />
30-
<Content Include="Fonts\JetBrains Mono Bold Nerd Font Complete Mono Windows Compatible.ttf" />
31-
<Content Include="Fonts\JetBrains Mono Bold Nerd Font Complete Windows Compatible.ttf" />
32-
<Content Include="Fonts\JetBrains Mono ExtraBold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
33-
<Content Include="Fonts\JetBrains Mono ExtraBold Italic Nerd Font Complete Windows Compatible.ttf" />
34-
<Content Include="Fonts\JetBrains Mono ExtraBold Nerd Font Complete Mono Windows Compatible.ttf" />
35-
<Content Include="Fonts\JetBrains Mono ExtraBold Nerd Font Complete Windows Compatible.ttf" />
36-
<Content Include="Fonts\JetBrains Mono ExtraLight Italic Nerd Font Complete Mono Windows Compatible.ttf" />
37-
<Content Include="Fonts\JetBrains Mono ExtraLight Italic Nerd Font Complete Windows Compatible.ttf" />
38-
<Content Include="Fonts\JetBrains Mono ExtraLight Nerd Font Complete Mono Windows Compatible.ttf" />
39-
<Content Include="Fonts\JetBrains Mono ExtraLight Nerd Font Complete Windows Compatible.ttf" />
40-
<Content Include="Fonts\JetBrains Mono Italic Nerd Font Complete Mono Windows Compatible.ttf" />
41-
<Content Include="Fonts\JetBrains Mono Italic Nerd Font Complete Windows Compatible.ttf" />
42-
<Content Include="Fonts\JetBrains Mono Light Italic Nerd Font Complete Mono Windows Compatible.ttf" />
43-
<Content Include="Fonts\JetBrains Mono Light Italic Nerd Font Complete Windows Compatible.ttf" />
44-
<Content Include="Fonts\JetBrains Mono Light Nerd Font Complete Mono Windows Compatible.ttf" />
45-
<Content Include="Fonts\JetBrains Mono Light Nerd Font Complete Windows Compatible.ttf" />
46-
<Content Include="Fonts\JetBrains Mono Medium Italic Nerd Font Complete Mono Windows Compatible.ttf" />
47-
<Content Include="Fonts\JetBrains Mono Medium Italic Nerd Font Complete Windows Compatible.ttf" />
48-
<Content Include="Fonts\JetBrains Mono Medium Nerd Font Complete Mono Windows Compatible.ttf" />
49-
<Content Include="Fonts\JetBrains Mono Medium Nerd Font Complete Windows Compatible.ttf" />
50-
<Content Include="Fonts\JetBrains Mono NL Bold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
51-
<Content Include="Fonts\JetBrains Mono NL Bold Italic Nerd Font Complete Windows Compatible.ttf" />
52-
<Content Include="Fonts\JetBrains Mono NL Bold Nerd Font Complete Mono Windows Compatible.ttf" />
53-
<Content Include="Fonts\JetBrains Mono NL Bold Nerd Font Complete Windows Compatible.ttf" />
54-
<Content Include="Fonts\JetBrains Mono NL ExtraBold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
55-
<Content Include="Fonts\JetBrains Mono NL ExtraBold Italic Nerd Font Complete Windows Compatible.ttf" />
56-
<Content Include="Fonts\JetBrains Mono NL ExtraBold Nerd Font Complete Mono Windows Compatible.ttf" />
57-
<Content Include="Fonts\JetBrains Mono NL ExtraBold Nerd Font Complete Windows Compatible.ttf" />
58-
<Content Include="Fonts\JetBrains Mono NL ExtraLight Italic Nerd Font Complete Mono Windows Compatible.ttf" />
59-
<Content Include="Fonts\JetBrains Mono NL ExtraLight Italic Nerd Font Complete Windows Compatible.ttf" />
60-
<Content Include="Fonts\JetBrains Mono NL ExtraLight Nerd Font Complete Mono Windows Compatible.ttf" />
61-
<Content Include="Fonts\JetBrains Mono NL ExtraLight Nerd Font Complete Windows Compatible.ttf" />
62-
<Content Include="Fonts\JetBrains Mono NL Italic Nerd Font Complete Mono Windows Compatible.ttf" />
63-
<Content Include="Fonts\JetBrains Mono NL Italic Nerd Font Complete Windows Compatible.ttf" />
64-
<Content Include="Fonts\JetBrains Mono NL Light Italic Nerd Font Complete Mono Windows Compatible.ttf" />
65-
<Content Include="Fonts\JetBrains Mono NL Light Italic Nerd Font Complete Windows Compatible.ttf" />
66-
<Content Include="Fonts\JetBrains Mono NL Light Nerd Font Complete Mono Windows Compatible.ttf" />
67-
<Content Include="Fonts\JetBrains Mono NL Light Nerd Font Complete Windows Compatible.ttf" />
68-
<Content Include="Fonts\JetBrains Mono NL Medium Italic Nerd Font Complete Mono Windows Compatible.ttf" />
69-
<Content Include="Fonts\JetBrains Mono NL Medium Italic Nerd Font Complete Windows Compatible.ttf" />
70-
<Content Include="Fonts\JetBrains Mono NL Medium Nerd Font Complete Mono Windows Compatible.ttf" />
71-
<Content Include="Fonts\JetBrains Mono NL Medium Nerd Font Complete Windows Compatible.ttf" />
72-
<Content Include="Fonts\JetBrains Mono NL Regular Nerd Font Complete Mono Windows Compatible.ttf" />
73-
<Content Include="Fonts\JetBrains Mono NL Regular Nerd Font Complete Windows Compatible.ttf" />
74-
<Content Include="Fonts\JetBrains Mono NL SemiBold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
75-
<Content Include="Fonts\JetBrains Mono NL SemiBold Italic Nerd Font Complete Windows Compatible.ttf" />
76-
<Content Include="Fonts\JetBrains Mono NL SemiBold Nerd Font Complete Mono Windows Compatible.ttf" />
77-
<Content Include="Fonts\JetBrains Mono NL SemiBold Nerd Font Complete Windows Compatible.ttf" />
78-
<Content Include="Fonts\JetBrains Mono NL Thin Italic Nerd Font Complete Mono Windows Compatible.ttf" />
79-
<Content Include="Fonts\JetBrains Mono NL Thin Italic Nerd Font Complete Windows Compatible.ttf" />
80-
<Content Include="Fonts\JetBrains Mono NL Thin Nerd Font Complete Mono Windows Compatible.ttf" />
81-
<Content Include="Fonts\JetBrains Mono NL Thin Nerd Font Complete Windows Compatible.ttf" />
82-
<Content Include="Fonts\JetBrains Mono Regular Nerd Font Complete Mono Windows Compatible.ttf" />
83-
<Content Include="Fonts\JetBrains Mono Regular Nerd Font Complete Windows Compatible.ttf" />
84-
<Content Include="Fonts\JetBrains Mono SemiBold Italic Nerd Font Complete Mono Windows Compatible.ttf" />
85-
<Content Include="Fonts\JetBrains Mono SemiBold Italic Nerd Font Complete Windows Compatible.ttf" />
86-
<Content Include="Fonts\JetBrains Mono SemiBold Nerd Font Complete Mono Windows Compatible.ttf" />
87-
<Content Include="Fonts\JetBrains Mono SemiBold Nerd Font Complete Windows Compatible.ttf" />
88-
<Content Include="Fonts\JetBrains Mono Thin Italic Nerd Font Complete Mono Windows Compatible.ttf" />
89-
<Content Include="Fonts\JetBrains Mono Thin Italic Nerd Font Complete Windows Compatible.ttf" />
90-
<Content Include="Fonts\JetBrains Mono Thin Nerd Font Complete Mono Windows Compatible.ttf" />
91-
<Content Include="Fonts\JetBrains Mono Thin Nerd Font Complete Windows Compatible.ttf" />
9228
<Content Include="Product.xml" />
9329
<Content Include="TrueType.xsl" />
9430
</ItemGroup>
95-
<ItemGroup>
96-
<Folder Include="Fonts" />
97-
</ItemGroup>
9831
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
9932
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
10033
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
10134
<Error Text="The WiX Toolset v3.11 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset.org/releases/v3.11/stable" />
10235
</Target>
10336
<PropertyGroup>
104-
<PreBuildEvent>heat dir $(ProjectDir)\fonts -ag -cg ProductComponents -sfrag -srd -sreg -scom -var var.FontsDirectory -dr FontsFolder -t $(ProjectDir)TrueType.xsl -out $(ProjectDir)Directory.wxs</PreBuildEvent>
37+
<PreBuildEvent>"%WIX%bin\heat" dir $(ProjectDir)fonts -ag -cg ProductComponents -sfrag -srd -sreg -scom -var var.FontsDirectory -dr FontsFolder -t $(ProjectDir)TrueType.xsl -out $(ProjectDir)Directory.wxs</PreBuildEvent>
10538
</PropertyGroup>
10639
<!--
10740
To modify your build process, add your task inside one of the targets below and uncomment it.

0 commit comments

Comments
 (0)