Files
wxWidgets/.github/workflows/make_release.yml
T
Vadim Zeitlin 4f31802694 Use SHA-256 checksums for the release files instead of SHA-1 ones
GitHub automatically computes and shows SHA-256 checksums on the
download page, making verifying them more convenient than SHA-1 ones.

SHA-1 is also generally considered insecure nowadays.

See #26744.
2026-07-29 20:14:18 +02:00

119 lines
4.3 KiB
YAML

# This manually triggered workflow creates a new draft release.
name: Create Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
permissions:
contents: write
jobs:
add_release_sources:
runs-on: ubuntu-26.04
name: Create Release with Source Archives
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: 'recursive'
- name: Install Required Tools
run: |
sudo apt-get -q -o=Dpkg::Use-Pty=0 -y install doxygen gettext graphviz
- name: Create Release Archives
run: ./build/tools/release.sh ${{ inputs.version }}
# This is not very elegant, but we can't update checksums from two
# different jobs, so we just append to the release body which then
# needs to be edited interactively.
- name: Create Archives Checksums
working-directory: distrib/release/${{ inputs.version }}
run: |
printf '\n# THESE CHECKSUMS MUST BE MOVED ABOVE!\n\n````\n' >> ../../../docs/release.md
sha256sum * | tee -a ../../../docs/release.md
- name: Create Draft Release
uses: softprops/action-gh-release@v3
id: create_release
with:
name: wxWidgets ${{ inputs.version }}
body_path: docs/release.md
files: |
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}.zip
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}.7z
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}.tar.bz2
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}-headers.7z
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}-docs-html.zip
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}-docs-html.tar.bz2
fail_on_unmatched_files: true
draft: true
# We have to store the archive used by the job below as an artifact
# because it can't be downloaded from a draft release without
# impersonating the same user and I don't know how to do it.
- name: Upload Release Archive
uses: actions/upload-artifact@v7
with:
name: wxWidgets-${{ inputs.version }}-source-archive
path: distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}.zip
retention-days: 1
add_msw_files:
needs: add_release_sources
runs-on: windows-2022
name: Add MSW Files to the Release
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Download Release Archive
uses: actions/download-artifact@v7
with:
name: wxWidgets-${{ inputs.version }}-source-archive
- name: Install Prerequisites
run: |
choco install -y --no-progress graphviz html-help-workshop
choco install -y doxygen.install --version=1.15.0
- name: Create MSW Installer and Help File
shell: cmd
run: |
md distrib\release
md distrib\release\${{ inputs.version }}
move wxWidgets-${{ inputs.version }}.zip distrib\release\${{ inputs.version }}
set "PATH=C:\Program Files\doxygen\bin;C:\Program Files (x86)\HTML Help Workshop;%PATH%"
build\tools\release.bat ${{ inputs.version }}
# This doesn't really decrease the file size but .chm files can't be
# uploaded to GitHub, while .zip files can.
- name: Pack CHM File
working-directory: distrib/release/${{ inputs.version }}
run: 7z a wxWidgets-${{ inputs.version }}-docs-chm.zip wxWidgets-${{ inputs.version }}.chm
- name: Create Archives Checksums
working-directory: distrib/release/${{ inputs.version }}
shell: cmd
run: |
sha256sum * > ..\..\..\checksums
type ..\..\..\checksums
- name: Add Files to the Release
uses: softprops/action-gh-release@v3
with:
name: wxWidgets ${{ inputs.version }}
body_path: checksums
append_body: true
files: |
distrib/release/${{ inputs.version }}/wxMSW-${{ inputs.version }}-Setup.exe
distrib/release/${{ inputs.version }}/wxWidgets-${{ inputs.version }}-docs-chm.zip
fail_on_unmatched_files: true
draft: true