20 runs-on: ubuntu-latest
23 - name: Download all bundles
24 uses: actions/download-artifact@v4
26 - name: Calculate checksums
28 echo "::group::Move bundles to a single folder"
30 mv openttd-*/* bundles/
34 for i in $(ls openttd-*); do
35 echo "::group::Calculating checksums for ${i}"
36 openssl dgst -r -md5 -hex $i > $i.md5sum
37 openssl dgst -r -sha1 -hex $i > $i.sha1sum
38 openssl dgst -r -sha256 -hex $i > $i.sha256sum
42 # Some targets generate files that are meant for our-eyes-only.
43 # They are stored in the "internal" folder, and contains bundles
44 # for targets like Windows Store. No user has a benefit of knowing
45 # they exist, hence: internal.
46 if [ -e internal ]; then
48 for i in $(ls openttd-*); do
49 echo "::group::Calculating checksums for ${i}"
50 openssl dgst -r -md5 -hex $i > $i.md5sum
51 openssl dgst -r -sha1 -hex $i > $i.sha1sum
52 openssl dgst -r -sha256 -hex $i > $i.sha256sum
60 cp -R symbols-*/* symbols/
62 # Compress all files as gzip, to reduce cost of storage on the CDN.
63 for i in $(find symbols -mindepth 2 -type f); do
67 # Leave a mark in each folder what version actually created the symbol file.
68 for i in $(find symbols -mindepth 2 -type d); do
69 touch ${i}/.${{ inputs.version }}.txt
73 uses: actions/upload-artifact@v4
79 - name: Store breakpad symbols
80 uses: actions/upload-artifact@v4
91 uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v5
93 CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }}
94 DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
95 DEPLOYMENT_APP_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
97 artifact-name: cdn-bundles
98 folder: ${{ inputs.folder }}
99 version: ${{ inputs.version }}
105 name: Publish symbols
106 uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v5
108 SYMBOLS_SIGNING_KEY: ${{ secrets.SYMBOLS_SIGNING_KEY }}
110 artifact-name: cdn-symbols
114 if: ${{ inputs.trigger_type == 'new-master' }}
120 runs-on: ubuntu-latest
123 - name: Generate access token
125 uses: tibdex/github-app-token@v2
127 app_id: ${{ secrets.DEPLOYMENT_APP_ID }}
128 private_key: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
129 installation_retrieval_mode: "repository"
130 installation_retrieval_payload: "OpenTTD/workflows"
132 - name: Trigger 'Publish Docs'
133 uses: peter-evans/repository-dispatch@v3
135 token: ${{ steps.generate_token.outputs.token }}
136 repository: OpenTTD/workflows
137 event-type: publish-docs
138 client-payload: '{"version": "${{ inputs.version }}", "folder": "${{ inputs.folder }}"}'