From 22e70c58408ee1f46027c4c24a1ae107cf088c92 Mon Sep 17 00:00:00 2001 From: Aetf Date: Mon, 13 Jun 2022 22:56:15 -0700 Subject: [PATCH 1/3] Update news --- NEWS | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NEWS b/NEWS index 5ba64e91..ce2270c0 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,26 @@ = KMSCON Release News = +CHANGES WITH 9.0.0: + * Modernized build system from autotools to meson. + + * Note that many features rely on newer version of libtsm, + thus we now requires libtsm >= 4.0.0 from the maintained fork at + https://github.com/Aetf/libtsm. + + * New features! + - Custom palette support (#39) + - Compose (dead-key) support (#36) + - 24bit fbdev support (#8) + - Detect XKB layout from localed (#7) + - Underline and italic font (#3) + + * Bug fixes + - Fixed thin pixel lines at some screen edges (dac3c31b9e78ab28545caf88cbd8105a8c62052e) + - Fixed many undefined behaviors and other minor bugs + - Modernized codebase by moving away from deprecated symbols + + * Many small fixes to documentation. + CHANGES WITH 8: * Several build-tools changes. Please adjust your build-scripts accoringly: From c01257d6ae05fab32b46825711b5cc27df971bb9 Mon Sep 17 00:00:00 2001 From: Aetf Date: Mon, 13 Jun 2022 23:37:42 -0700 Subject: [PATCH 2/3] build: automatically extract release note from NEWS upon releasing --- .github/workflows/release.yml | 17 +++---------- tools/extract_release_note.py | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 14 deletions(-) create mode 100755 tools/extract_release_note.py diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 076dc769..714cf03c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,17 +1,3 @@ -# The way this works is a little weird. But basically, the create-release job -# runs purely to initialize the GitHub release itself. Once done, the upload -# URL of the release is saved as an artifact. -# -# The build-release job runs only once create-release is finished. It gets -# the release upload URL by downloading the corresponding artifact (which was -# uploaded by create-release). It then builds the release executables for each -# supported platform and attaches them as release assets to the previously -# created release. -# -# The key here is that we create the release only once. -# -# Adapted from: https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml - name: release on: push: @@ -36,8 +22,11 @@ jobs: - name: Create source distribution # no unit tests yet run: meson dist -C builddir/ --no-tests + - name: Create release note + run: tools/extract_release_note.py NEWS ${{ github.workspace }}-release-note.txt - name: Release uses: softprops/action-gh-release@v1 with: files: builddir/meson-dist/* + body_path: ${{ github.workspace }}-release-note.txt diff --git a/tools/extract_release_note.py b/tools/extract_release_note.py new file mode 100755 index 00000000..3a06eafe --- /dev/null +++ b/tools/extract_release_note.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2022 Aetf +# +# SPDX-License-Identifier: MIT +import re +import inspect + +PTN_RELEASE_NOTE = re.compile(r'^CHANGES WITH.+$([\s\S]+?)^CHANGES WITH.+$', re.MULTILINE) + + +def extract(src: str) -> str: + """Find section between the first and the next 'CHANGES WITH xx:' lines, + and strip common prefix whitespace + """ + m = PTN_RELEASE_NOTE.search(src) + if m is not None: + return inspect.cleandoc(m.group(1)) + '\n' + else: + return '' + + +def main(): + import argparse + import sys + + parser = argparse.ArgumentParser() + parser.add_argument( + 'src', + type=argparse.FileType('r'), + nargs='?', + help='input NEWS', + default=sys.stdin, + ) + parser.add_argument( + 'dest', + type=argparse.FileType('w'), + nargs='?', + help='output', + default=sys.stdout, + ) + args = parser.parse_args() + + args.dest.write(extract(args.src.read())) + + +if __name__ == '__main__': + main() From a195e9f892b0cfe6df9c385deedd347aa97872f1 Mon Sep 17 00:00:00 2001 From: Aetf Date: Mon, 13 Jun 2022 23:46:23 -0700 Subject: [PATCH 3/3] build: upload artifact when while not merged and fix dependencies --- .github/workflows/release.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 714cf03c..48a66bdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ on: push: # Enable when testing release infrastructure on a branch. branches: - - build + - release-* tags: - 'v[0-9]+.[0-9]+.[0-9]+' jobs: @@ -17,6 +17,23 @@ jobs: python-version: '3.x' - name: Install meson run: pip install meson ninja + - name: Install dependencies + run: | + sudo apt-get install -y libudev-dev libxkbcommon-dev libdrm-dev libgbm-dev libegl1-mesa-dev libgles-dev libpango1.0-dev libsystemd-dev + - name: Install libtsm + run: | + pip install cmake + curl -L -o libtsm.tar.gz $(curl -s https://api.github.com/repos/Aetf/libtsm/releases/latest \ + | grep "tarball_url" \ + | awk '{ print $2 }' \ + | sed 's/,$//' \ + | sed 's/"//g' ) + mkdir libtsm + tar -xf libtsm.tar.gz -C libtsm --strip 1 + cd libtsm + cmake -Bbuilddir + cmake --build builddir + sudo cmake --install builddir - name: Meson setup run: meson setup builddir/ - name: Create source distribution @@ -24,8 +41,17 @@ jobs: run: meson dist -C builddir/ --no-tests - name: Create release note run: tools/extract_release_note.py NEWS ${{ github.workspace }}-release-note.txt + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: release-files + path: | + builddir/meson-dist/* + ${{ github.workspace }}-release-note.txt - name: Release uses: softprops/action-gh-release@v1 + # only actually create the release when run on tag + if: startsWith(github.ref, 'refs/tags/') with: files: builddir/meson-dist/* body_path: ${{ github.workspace }}-release-note.txt