docs/Changelog: Update for 12.5.2 #455
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to build (e.g. v12.0.0)' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| name: Validate release tag | |
| runs-on: ubuntu-latest | |
| outputs: | |
| tag: ${{ steps.validate.outputs.tag }} | |
| sha: ${{ steps.validate.outputs.sha }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Validate tag | |
| id: validate | |
| env: | |
| TAG_INPUT: ${{ inputs.tag || github.ref_name }} | |
| run: | | |
| set -eu | |
| if ! printf '%s' "$TAG_INPUT" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then | |
| echo "Invalid release tag: $TAG_INPUT" >&2 | |
| exit 1 | |
| fi | |
| git fetch --force origin "refs/tags/$TAG_INPUT:refs/tags/$TAG_INPUT" | |
| TAG_SHA="$(git rev-list -n 1 "refs/tags/$TAG_INPUT")" | |
| echo "tag=$TAG_INPUT" >> "$GITHUB_OUTPUT" | |
| echo "sha=$TAG_SHA" >> "$GITHUB_OUTPUT" | |
| build: | |
| name: Build release artifacts | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| container: archlinux:latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Install dependencies | |
| run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel gzip bzip2 xz zip git autoconf automake nasm curl mtools llvm clang lld | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ needs.validate.outputs.sha }} | |
| fetch-depth: 0 | |
| - name: Git config | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Regenerate | |
| run: ./bootstrap | |
| - name: Create build dir | |
| run: mkdir -p build | |
| - name: Configure | |
| run: cd build && ../configure --enable-all | |
| - name: Package source release tarball | |
| run: | | |
| make -C build dist | |
| mv build/limine-*.tar.* ./ | |
| - name: Build the bootloader | |
| run: make -C build -j$(nproc) | |
| - name: Clean limine | |
| run: rm build/bin/limine | |
| - name: Fetch MinGW | |
| run: | | |
| curl -Lo /tmp/mingw-i486.tar.xz https://github.com/osdev0/mingw-binary-builds/releases/latest/download/mingw-i486.tar.xz | |
| cd /tmp | |
| tar -xf mingw-i486.tar.xz | |
| - name: Build limine for Windows | |
| run: | | |
| make -C build/bin CC="/tmp/mingw-i486/bin/i486-w64-mingw32-gcc" CFLAGS="-O2 -pipe" CPPFLAGS="-D__USE_MINGW_ANSI_STDIO" limine | |
| /tmp/mingw-i486/bin/i486-w64-mingw32-strip build/bin/limine.exe | |
| mkdir build/bin/limine-tool-windows-x86 | |
| mv build/bin/limine.exe build/bin/limine-tool-windows-x86/ | |
| - name: Copy LICENSE to bin | |
| run: cp COPYING build/bin/LICENSE | |
| - name: Remove limine-bios-hdd.bin | |
| run: rm build/bin/limine-bios-hdd.bin | |
| - name: Create binary release zip and tarballs | |
| run: | | |
| mv build/bin ./limine-binary | |
| zip -r limine-binary.zip limine-binary | |
| tar -cvf limine-binary.tar limine-binary | |
| gzip < limine-binary.tar > limine-binary.tar.gz | |
| xz < limine-binary.tar > limine-binary.tar.xz | |
| rm -rf limine-binary.tar limine-binary | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-artifacts | |
| if-no-files-found: error | |
| path: | | |
| limine-*.tar.* | |
| limine-binary.zip | |
| sign_release: | |
| name: Sign and upload release artifacts | |
| needs: | |
| - validate | |
| - build | |
| runs-on: ubuntu-latest | |
| container: archlinux:latest | |
| environment: release-signing | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Install dependencies | |
| run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S gnupg | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: release-artifacts | |
| path: dist | |
| - name: Import GPG private key | |
| run: | | |
| set -eu | |
| if [ -z "$SIGNING_PRIVATE_KEY" ]; then | |
| echo "No signing key registered for $GITHUB_ACTOR" >&2 | |
| echo "Add a ${GITHUB_ACTOR}_PRIVATE_KEY secret to the release-signing environment" >&2 | |
| exit 1 | |
| fi | |
| echo "$SIGNING_PRIVATE_KEY" | gpg --batch --import | |
| SIGNING_KEY_FPR="$(gpg --batch --with-colons --list-secret-keys | awk -F: '$1 == "fpr" { print $10; exit }')" | |
| test -n "$SIGNING_KEY_FPR" | |
| echo "SIGNING_KEY_FPR=$SIGNING_KEY_FPR" >> "$GITHUB_ENV" | |
| env: | |
| SIGNING_PRIVATE_KEY: ${{ secrets[format('{0}_PRIVATE_KEY', github.actor)] }} | |
| - name: Sign release artifacts | |
| run: | | |
| set -eu | |
| for f in dist/limine-*.tar.* dist/limine-binary.zip; do | |
| gpg --batch --default-key "$SIGNING_KEY_FPR" --detach-sign "$f" | |
| done | |
| - name: Create release notes | |
| env: | |
| TAG_NAME: ${{ needs.validate.outputs.tag }} | |
| run: | | |
| cat >rel_notes.txt <<EOF | |
| Changelog can be found [here](https://github.com/Limine-Bootloader/Limine/blob/$TAG_NAME/ChangeLog). | |
| EOF | |
| cat <<'EOF' >>rel_notes.txt | |
| Tarballs are signed using key ID `@SIGNING_KEY_FPR@` which can be obtained from a keyserver such as `keyserver.ubuntu.com`. | |
| Import the public key with: | |
| ```bash | |
| gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys @SIGNING_KEY_FPR@ | |
| ``` | |
| In order to verify the tarball with the given signature, do: | |
| ```bash | |
| gpg --verify <tarball sig file> <associated tarball> | |
| ``` | |
| EOF | |
| sed -i "s/@SIGNING_KEY_FPR@/$SIGNING_KEY_FPR/g" rel_notes.txt | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ needs.validate.outputs.tag }} | |
| body_path: rel_notes.txt | |
| files: | | |
| dist/limine-*.tar.* | |
| dist/limine-binary.zip* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |