Skip to content

Commit 41b686a

Browse files
committed
maybe fix windows
1 parent 616452d commit 41b686a

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ jobs:
127127
mv build/nsis/PlumeInstaller.exe build/out/${{ env.BINARY_NAME }}-setup.exe
128128
129129
- name: Create AppCast
130+
shell: pwsh
130131
run: |
131132
curl -L -o WinSparkle-0.8.1.zip https://github.com/vslavik/winsparkle/releases/download/v0.8.1/WinSparkle-0.8.1.zip
132133
unzip WinSparkle-0.8.1.zip -d WinSparkle
133-
echo "${{ secrets.SPARKLE_PRIV_KEY_WIN }}" > dsa_priv.pem
134-
SIGNATURE=$(.\WinSparkle\bin\sign_update.bat build/out/${{ env.BINARY_NAME }}-setup.exe dsa_priv.pem)
135-
VERSION=$(grep '^version *= *' Cargo.toml | head -n1 | sed 's/version *= *"\(.*\)"/\1/')
136-
DATE=$(Get-Date -Format "ddd, dd MMM yyyy HH:mm:ss K")
137-
138-
cat > build/out/appcast.xml <<EOF
134+
"${{ secrets.SPARKLE_PRIV_KEY_WIN }}" | Out-File -Encoding ascii dsa_priv.pem
135+
$SIGNATURE = & .\WinSparkle\bin\sign_update.bat build/out/${{ env.BINARY_NAME }}-setup.exe dsa_priv.pem
136+
$VERSION = (Select-String '^version *= *' Cargo.toml | Select-Object -First 1).Line -replace 'version *= *"(.+)"','$1'
137+
$DATE = Get-Date -Format "ddd, dd MMM yyyy HH:mm:ss K"
138+
$xml = @"
139139
<?xml version="1.0" encoding="UTF-8"?>
140140
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
141141
<channel>
@@ -146,14 +146,15 @@ jobs:
146146
<title>Version $VERSION</title>
147147
<sparkle:version>$VERSION</sparkle:version>
148148
<pubDate>$DATE</pubDate>
149-
<enclosure url="https://github.com/khcrysalis/PlumeImpactor/releases/latest/download/${{ env.BINARY_NAME }}-setup.exe"
150-
sparkle:dsaSignature="$SIGNATURE"
151-
length="0"
152-
type="application/octet-stream" />
153-
</item>
149+
<enclosure url="https://github.com/khcrysalis/PlumeImpactor/releases/latest/download/${{ env.BINARY_NAME }}-setup.exe"
150+
sparkle:dsaSignature="$SIGNATURE"
151+
length="0"
152+
type="application/octet-stream" />
153+
</item>
154154
</channel>
155155
</rss>
156-
EOF
156+
"@
157+
$xml | Out-File -Encoding utf8 build/out/appcast.xml
157158
158159
- name: Upload Bundles
159160
uses: actions/upload-artifact@v4

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)