1414
1515jobs :
1616 check-for-new-cascadia :
17- runs-on : ubuntu-20 .04
17+ runs-on : ubuntu-22 .04
1818 outputs :
1919 tag_name : ${{ env.CASCADIATAG }}
2020 tag_exists : ${{ steps.check_tag.outputs.exists }}
2424 uses : octokit/request-action@v2.x
2525 id : get_latest_release
2626 with :
27- route : GET /repos/{owner}/{repo}/releases/latest
28- owner : microsoft
29- repo : cascadia-code
27+ route : GET /repos/microsoft/cascadia-code/releases/latest
3028 env :
3129 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3230 - name : Get the latest Cascadia tag
@@ -46,14 +44,13 @@ jobs:
4644 build-and-release :
4745 needs : check-for-new-cascadia
4846 if : ${{ github.event_name != 'schedule' || needs.check-for-new-cascadia.outputs.tag_exists != 'true' }}
49- runs-on : ubuntu-18 .04
47+ runs-on : ubuntu-22 .04
5048 env :
51- NERDFONTVERS : v2.1.0
5249 CASCADIATAG : ${{ needs.check-for-new-cascadia.outputs.tag_name }}
5350 CASCADIATAG_ISNOTNEW : ${{ needs.check-for-new-cascadia.outputs.tag_exists }}
5451
5552 steps :
56- - uses : actions/checkout@v2
53+ - uses : actions/checkout@v3
5754 with :
5855 fetch-depth : 0
5956 - name : Decide on version
@@ -68,29 +65,46 @@ jobs:
6865 fi
6966 echo "OURVERSION=${OURVERSION}" >> $GITHUB_ENV
7067 - name : Download latest version of Cascadia
68+ uses : robinraju/release-downloader@v1.5
69+ with :
70+ repository : " microsoft/cascadia-code"
71+ tag : ${{ needs.check-for-new-cascadia.outputs.tag_name }}
72+ fileName : " *.zip"
73+ - name : Open Cascadia release
7174 run : |
72- CASCADIAVERS=`curl -L 'https://github.com/microsoft/cascadia-code/releases/latest' | grep CascadiaCode | sed 's!\(.*/microsoft/cascadia-code/releases/download/\([^"]*\).*\|.*span.*\)!\2!'`
73- echo Downloading ${CASCADIAVERS}
74- curl -L https://github.com/microsoft/cascadia-code/releases/download/${CASCADIAVERS} -O
75- unzip CascadiaCode*.zip
76- - name : Install FontForge
77- run : |
78- sudo add-apt-repository ppa:fontforge/fontforge -y -u;
79- sudo apt-get install fontforge -y;
80- - name : Download and patch Font Patcher
75+ unzip CascadiaCode*.zip 'ttf/*'
76+
77+ # Ubuntu 20.04 has only fontforge release 2020, but there are some vital bugfixes in the 2022 release
78+ # This can be replaced with the ordinary apt package when Ubuntu updates, probably with 22.10?
79+ - name : Fetch FontForge
8180 run : |
82- curl -L https://raw.githubusercontent.com/ryanoasis/nerd-fonts/${NERDFONTVERS}/font-patcher --output font-patcher
83- patch font-patcher 0001*.patch
84- - name : Download source fonts
81+ sudo apt install software-properties-common python3-fontforge fuse -y -q
82+ curl -L "https://github.com/fontforge/fontforge/releases/download/20220308/FontForge-2022-03-08-582bd41-x86_64.AppImage" \
83+ --output fontforge
84+ chmod u+x fontforge
85+ echo Try appimage
86+ ./fontforge --version
87+ export PATH=`pwd`:$PATH
88+ echo "PATH=$PATH" >> $GITHUB_ENV
89+ echo Try appimage with path
90+ fontforge --version
91+
92+ - name : Get Font Patcher
93+ uses : robinraju/release-downloader@v1.5
94+ with :
95+ repository : " ryanoasis/nerd-fonts"
96+ latest : true
97+ fileName : " FontPatcher.zip"
98+ - name : Open Font Patcher release
8599 run : |
86- chmod +x download-source-fonts.sh
87- ./download-source-fonts.sh
100+ unzip FontPatcher.zip
101+
88102 - name : Install PIP
89- run : sudo apt install python -pip -y
103+ run : sudo apt install python3 -pip -y
90104 - name : Install configparser
91- run : pip install configparser
105+ run : pip3 install configparser
92106 - name : Extract additional powerline glyphs
93- run : fontforge -lang=ff -script extract-extra-glyphs
107+ run : fontforge -lang=ff -script "`pwd`/ extract-extra-glyphs" "`pwd`" `pwd`/src/**/octicons.ttf
94108 - name : Build Powerline
95109 run : |
96110 ./do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPL.ttf "Delugia PL"
@@ -148,32 +162,32 @@ jobs:
148162 zip delugia-book.zip delugia-book/*
149163 - name : Check for preexisting glyphs
150164 run : |
151- grep 'Found existing' process*.log
152- - uses : actions/upload-artifact@master
165+ grep 'Found existing' process*.log | grep -vE ' Powerline(Extra)?Symbols>'
166+ - uses : actions/upload-artifact@v3
153167 with :
154168 name : Delugia Powerline
155169 path : " delugia-powerline"
156- - uses : actions/upload-artifact@master
170+ - uses : actions/upload-artifact@v3
157171 with :
158172 name : Delugia Mono Powerline
159173 path : " delugia-mono-powerline"
160- - uses : actions/upload-artifact@master
174+ - uses : actions/upload-artifact@v3
161175 with :
162176 name : Delugia Complete
163177 path : " delugia-complete"
164- - uses : actions/upload-artifact@master
178+ - uses : actions/upload-artifact@v3
165179 with :
166180 name : Delugia Mono Complete
167181 path : " delugia-mono-complete"
168- - uses : actions/upload-artifact@master
182+ - uses : actions/upload-artifact@v3
169183 with :
170184 name : Delugia Book
171185 path : " delugia-book"
172186
173187 # Release part
174188 - name : Create tag
175189 if : ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') && needs.check-for-new-cascadia.outputs.tag_exists != 'true' }}
176- uses : actions/github-script@v3
190+ uses : actions/github-script@v6
177191 with :
178192 github-token : ${{ github.token }}
179193 script : |
0 commit comments