Change: [Actions] release Windows Store files to CDN

Currently they had a name that the rest of our system cannot
deal with correctly. "cert.pfx" is also not very descriptive from
a system as a whole.

As such, we now name it like any other file, so it can be published
safely to the CDN.
This commit is contained in:
Patric Stout 2023-01-28 14:13:21 +01:00 committed by Patric Stout
parent 425ba82676
commit 146bd74077
3 changed files with 37 additions and 6 deletions

View File

@ -2,6 +2,10 @@ name: Release (Windows Store)
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
windows-store:
@ -174,11 +178,15 @@ jobs:
makeappx build /v /f PackagingLayout.xml /op output\ /bv %OTTD_VERSION% /pv %OTTD_VERSION% /ca
SignTool sign /fd sha256 /a /f cert.pfx /p password "output\OpenTTD.appxbundle"
- name: Store appx
REM Move resulting files to bundles folder
mkdir bundles
mkdir bundles\internal
move cert.pfx bundles\internal\openttd-${{ inputs.version }}-windows-store.pfx
move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle
- name: Store bundles
uses: actions/upload-artifact@v3
with:
name: openttd-windows-store
path: |
builds/output/OpenTTD.appxbundle
builds/cert.pfx
path: builds/bundles
retention-days: 5

View File

@ -66,6 +66,9 @@ jobs:
uses: ./.github/workflows/release-windows-store.yml
secrets: inherit
with:
version: ${{ needs.source.outputs.version }}
upload-aws:
name: Upload (AWS)
needs:
@ -74,6 +77,11 @@ jobs:
- linux
- macos
- windows
- windows-store
# As windows-store is condition, we need to check ourselves if we need to run.
# The always() makes sure the rest is always evaluated.
if: always() && needs.source.result == 'success' && needs.docs.result == 'success' && needs.linux.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' && (needs.windows-store.result == 'success' || needs.windows-store.result == 'skipped')
uses: ./.github/workflows/upload-aws.yml
secrets: inherit

View File

@ -28,9 +28,9 @@ jobs:
echo "::group::Move bundles to a single folder"
mkdir bundles
mv openttd-*/* bundles/
cd bundles
echo "::group::Build"
echo "::endgroup::"
cd bundles
for i in $(ls openttd-*); do
echo "::group::Calculating checksums for ${i}"
openssl dgst -r -md5 -hex $i > $i.md5sum
@ -39,6 +39,21 @@ jobs:
echo "::endgroup::"
done
# Some targets generate files that are meant for our-eyes-only.
# They are stored in the "internal" folder, and contains bundles
# for targets like Windows Store. No user has a benefit of knowing
# they exist, hence: internal.
if [ -e internal ]; then
cd internal
for i in $(ls openttd-*); do
echo "::group::Calculating checksums for ${i}"
openssl dgst -r -md5 -hex $i > $i.md5sum
openssl dgst -r -sha1 -hex $i > $i.sha1sum
openssl dgst -r -sha256 -hex $i > $i.sha256sum
echo "::endgroup::"
done
fi
- name: Upload bundles to AWS
run: |
aws s3 cp --recursive --only-show-errors bundles/ s3://${{ secrets.CDN_S3_BUCKET }}/${{ inputs.folder }}/${{ inputs.version }}/