Skip to content

Commit

Permalink
版本发布 CI 与 changelog 修改 (#903)
Browse files Browse the repository at this point in the history
* update README.md
- Build status 使用 Github Actions Badge
- 更新输入法 OS 要求
- 更新代码贡献者列表

* 更新 CHANGELOG 至 0.15.0

* 更新 CI 配置文件

* 更新版本号至 0.15.0

* fix extract_changelog.ps1 [skip ci]

* fast test

* fix release-ci.yml [skip ci]

* add code block to CHANGLOG.md [skip ci]

* Update CHANGELOG.md

modify changelog.md

* allow ci to upload binary to release [skip ci]

* Update CHANGELOG [skip ci]

* Update README [skip ci]

* update appcast.xml

* update testing-appcast.xml

* Update CHANGELOG.md [skip ci]

---------

Co-authored-by: fxliang <fx.liang@outlook.com>
  • Loading branch information
determ1ne and fxliang authored Jun 6, 2023
1 parent 0f8a9cd commit 3c423fb
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 34 deletions.
72 changes: 70 additions & 2 deletions .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,73 @@ on:
pull_request:

jobs:
windows:
uses: ./.github/workflows/windows-build.yml
build:
runs-on: windows-2019
env:
boost_version: 1.78.0
BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_78_0
steps:
- name: Checkout last commit
uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure build environment
run: |
copy env.vs2019.bat env.bat
$git_ref_name = git describe --always
echo "git_ref_name=$git_ref_name" >> $env:GITHUB_ENV
- name: Cache Boost
id: cache-boost
uses: actions/cache@v3
with:
path: |
${{ env.BOOST_ROOT }}
key: ${{ runner.os }}-boost-${{ env.boost_version }}

- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: .\install_boost.bat

- name: Check submodules
run: git submodule > submodule-status

- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: |
librime
plum
key: ${{ runner.os }}-deps-${{ hashFiles('submodule-status') }}

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3

- name: Build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .\build.bat opencc

- name: Copy Rime files
run: .\github.install.bat

- name: Build Weasel
id: build_weasel
run: |
.\build.bat data
.\build.bat hant
.\build.bat installer
- name: Compress Debug Symbols
shell: pwsh
run: |
Compress-Archive -Path output\*.pdb -CompressionLevel Optimal -DestinationPath .\output\archives\symbols.zip
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
.\output\archives\weasel*.exe
.\output\archives\symbols.zip
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: Windows build
name: Release CI

on:
workflow_call:
inputs:
repository:
default: ${{ github.repository }}
required: false
type: string
rime_plugins:
required: false
type: string
push:
tags:
- '[0-9]+.*'

jobs:
build:
build-and-release:
permissions:
contents: write
runs-on: windows-2019
env:
boost_version: 1.78.0
BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_78_0
RIME_PLUGINS: ${{ inputs.rime_plugins }}
RIME_PLUGINS: rime/librime-charcode hchunhui/librime-lua lotem/librime-octagram
steps:
- name: Checkout last commit
uses: actions/checkout@v3
with:
repository: ${{ inputs.repository }}
submodules: recursive

- name: Configure build environment
Expand Down Expand Up @@ -60,6 +57,7 @@ jobs:
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .\build.bat opencc

# TODO: compile rime and other deps instead of downloading binary
- name: Copy Rime files
run: .\github.install.bat

Expand All @@ -74,11 +72,16 @@ jobs:
shell: pwsh
run: |
Compress-Archive -Path output\*.pdb -CompressionLevel Optimal -DestinationPath .\output\archives\symbols.zip
- name: Extract changelog
shell: pwsh
run: |
.\extract_changelog.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
if-no-files-found: error
path: |
.\output\archives\weasel*.exe
.\output\archives\symbols.zip
files: |
./output/archives/weasel*.exe
./output/archives/symbols.zip
body_path: ${{ github.workspace }}/RELEASE_CHANGELOG.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ Thumbs.db
*.VC.db
release-notes.html
*.7z
RELEASE_CHANGELOG.md
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,101 @@
<a name="0.15.0"></a>
## [0.15.0](https://github.com/rime/weasel/compare/0.15.0...0.14.3) (2023-06-06)


#### 安裝須知

**⚠️安裝小狼毫前請保存好文件資料,於安裝後重啓 Windows ,否則正在使用小狼毫的應用將會崩潰。**
**⚠️此版本的小狼毫需要使用 Windows 8.1 或更高版本的操作系統。**

#### 主要更新

* 升級核心算法庫至 [librime 1.8.5](https://github.com/rime/librime/blob/master/CHANGELOG.md#185-2023-02-05)
* DPI 根據顯示器自動調整
* 支持候選窗口等圓角顯示
* `style/layout/corner_radius: int`
* 兼容鼠鬚管中高亮圓角參數`style/layout/hilited_corner_radius: int`
* 支持主題顏色中含有透明通道代碼, 支持格式 0xaabbggrr,0xbbggrr, 0xabgr, 0xbgr
* 配色主題支持默認ABGR順序,或ARGB、RGBA順序
* `preset_color_schemes/color_scheme/color_format: "argb" | "rgba" | ""`
* 支持編碼/高亮候選/普通候選/輸入窗口/候選邊框的陰影顏色繪製
* `style/layout/shadow_radius: int`
* `style/layout/shadow_offset_x: int`
* `style/layout/shadow_offset_y: int`
* `preset_color_schemes/color_scheme/shadow_color: color`
* `preset_color_schemes/color_scheme/nextpage_color: color`
* `preset_color_schemes/color_scheme/prevpage_color: color`
* `preset_color_schemes/color_scheme/candidate_back_color: color`
* `preset_color_schemes/color_scheme/candidate_shadow_color: color`
* `preset_color_schemes/color_scheme/candidate_border_color: color`
* `preset_color_schemes/color_scheme/hilited_shadow_color: color`
* `preset_color_schemes/color_scheme/hilited_candidate_shadow_color: color`
* `preset_color_schemes/color_scheme/hilited_candidate_border_color: color`
* `preset_color_schemes/color_scheme/hilited_mark_color: color`
* 支持自定義標籤、註解字體及字號
* `style/label_font_face: string`
* `style/comment_font_face: string`
* `style/label_font_point: int`
* `style/comment_font_point: int`
* `style/layout/align_type: "top" | "center" | "bottom"`
* 支持指定字符 Unicode 區間字體設定
* 支持字重,字形風格設定
* `style/font_face: font_name[:start_code_point:end_code_point][:weight_set][:style_set][,font2...]`
* example: `"Segoe UI Emoji:20:39:bold:italic, Segoe UI Emoji:1f51f:1f51f, Noto Color Emoji SVG:80, Arial:600:6ff, Segoe UI Emoji:80, LXGW Wenkai Narrow"`
* 支持自定义字体回退範圍、順序定义
* 彩色字體支持
* Windows 10 周年版前:需要使用 COLR 格式彩色字體
* Windows 11 :可以使用 SVG 字體
* 新增豎直文字佈局
* `style/vertical_text: bool`
* `style/vertical_text_left_to_right: bool`
* `style/vertical_text_with_wrap: bool`
* 新增豎直佈局vertical窗口上移時自動倒序排列
* `style/vertical_auto_reverse: bool`
* 新增「天圓地方」佈局:由 margin 與 hilite_padding 確定, 當margin <= hilite_padding時生效
* margin_x 或 margin_y 設置爲負值時,隱藏輸入窗口,不影響方案選單顯示
* 新增 preedit_type: preview_all ,在輸入時將候選項顯示於 composition 中
* `style/preedit_type: "composition" | "preview" | "preview_all"`
* 新增輸入法高亮提示標記
* `style/mark_text: string`
* 新增輸入方案圖標顯示,可在語言欄中顯示,文件格式爲ico
* `schema/icon: string`
* `schema/ascii_icon: string`
* 新增選項,允許在光標位置獲取失敗時於窗口左上角繪製候選框(而不是桌面左上角)
* `style/layout/enhanced_position: bool`
* 新增鼠標點擊截圖到剪貼板功能
* 新增選項,支持越長自動折行/換列顯示
* `style/layout/max_width: int`
* `style/layout/max_height: int`
* 支持方案內設定配色
* `style/color_scheme: string`
* 支持多行内容顯示,\r, \n, \r\n均支持
* 支持方案內設定配色
* 繪製性能提升
* composition 模式下新增下劃線顯示
* 隨二進制文件提供調試符號

#### Bug 修復

* 轉義日文鍵盤中特殊按鍵
* 候選文字過長時崩潰
* 修復用戶目錄下無 `default.custom.yaml``weasel.custom.yaml` 時,設定窗口無法彈出的問題
* 方案中設定inline_preedit爲true時,部署後編碼末端出現異常符號
* 部分應用無法輸入文字的問題
* 修復部署時無顯示提示的問題
* 修復中文路徑相關問題
* 修復右鍵菜單打開程序目錄/用戶目錄時,資源管理器無響應的問題
* 修復部分內存訪問問題
* 修復操作系統 / WinGet 無法識別小狼毫版本號的問題
* 修復 composition 模式下光標位置不正常的問題
* 修復 Word 中小狼毫工作不正常的問題
* 若干開發環境配置問題修復

#### 已知問題

* 部分應用仍存在輸入法無法輸入文字的問題
* WeaselServer 仍可能發生崩潰
* 部分防病毒軟件可能誤報病毒

<a name="0.14.3"></a>
## 0.14.3 (2019-06-22)

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
式恕堂 版權所無

[![Download](https://img.shields.io/github/v/release/rime/weasel)](https://github.com/rime/weasel/releases/latest)
[![Build status](https://ci.appveyor.com/api/projects/status/github/rime/weasel?svg=true)](https://ci.appveyor.com/project/rime/weasel)
[![Build status](https://github.com/rime/weasel/actions/workflows/commit-ci.yml/badge.svg)](https://github.com/rime/weasel/actions/workflows/commit-ci.yml)
[![GitHub Tag](https://img.shields.io/github/tag/rime/weasel.svg)](https://github.com/rime/weasel)

授權條款:GPLv3
Expand All @@ -21,7 +21,7 @@
安裝輸入法
----------

本品適用於 Windows XP SP3, Windows 7 ~ Windows 10
本品適用於 Windows 8.1 ~ Windows 11

初次安裝時,安裝程序將顯示「安裝選項」對話框。

Expand Down Expand Up @@ -72,6 +72,8 @@
* [Xiangyan Sun](https://github.com/wishstudio)
* [Prcuvu](https://github.com/Prcuvu)
* [nameoverflow](https://github.com/nameoverflow)
* [fxliang](https://github.com/fxliang)
* [Azuk 443](https://github.com/determ1ne)

查看更多 [代碼貢獻者](https://github.com/rime/weasel/graphs/contributors)

Expand Down
Binary file modified WeaselServer/WeaselServer.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if not exist env.bat copy env.bat.template env.bat

if exist env.bat call env.bat

if not defined WEASEL_VERSION set WEASEL_VERSION=0.14.3
if not defined WEASEL_VERSION set WEASEL_VERSION=0.15.0
if not defined WEASEL_BUILD set WEASEL_BUILD=0
if not defined WEASEL_ROOT set WEASEL_ROOT=%CD%

Expand Down
28 changes: 28 additions & 0 deletions extract_changelog.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$tag = $env:GITHUB_REF -replace 'refs/tags/'
$changelogPath = Join-Path $PSScriptRoot "CHANGELOG.md"
$outputPath = Join-Path $PSScriptRoot "RELEASE_CHANGELOG.md"

$changeLog = Get-Content $changelogPath
Out-File -FilePath $outputPath -NoNewline

$found = $false
foreach ($line in $changeLog) {
$versionLine = $line -match '<a name="(.*)"></a>'
if ($versionLine) {
$version = $Matches.1
if (-Not $found) {
if ($version -ne $tag) {
# version mismatch
Write-Output "version mismatch: changelog is ${version} but tag is ${tag}"
exit 1
} else {
$found = $true
Write-Output "extracting changelog for ${version}"
continue
}
} else {
exit 0
}
}
$line | Out-File -FilePath $outputPath -Append
}
4 changes: 2 additions & 2 deletions include/WeaselVersion.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#define WEASEL_VERSION_STR "0.14.3.0"
#define WEASEL_VERSION_NUM 0,14,3,0
#define WEASEL_VERSION_STR "0.15.0.0"
#define WEASEL_VERSION_NUM 0,15,0,0

#define WEASEL_CODE_NAME "Weasel"
#define WEASEL_VERSION WEASEL_VERSION_STR
8 changes: 4 additions & 4 deletions update/appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<description>小狼毫 Appcast 更新頻道</description>
<language>zh</language>
<item>
<title>小狼毫 0.14.3</title>
<title>小狼毫 0.15.0</title>
<sparkle:releaseNotesLink>http://rime.github.io/release/weasel/release-notes.html</sparkle:releaseNotesLink>
<pubDate>Sat, 22 Jun 2019 22:54:50 +0800</pubDate>
<enclosure url="https://dl.bintray.com/rime/weasel/weasel-0.14.3.0-installer.exe"
sparkle:version="0.14.3"
<pubDate>Sat, 10 Jun 2023 23:00:00 +0800</pubDate>
<enclosure url="https://github.com/rime/weasel/releases/download/0.15.0/weasel-0.15.0.0-installer.exe"
sparkle:version="0.15.0"
type="application/octet-stream"/>
</item>
</channel>
Expand Down
8 changes: 4 additions & 4 deletions update/testing-appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<description>小狼毫測試版 Appcast 更新頻道</description>
<language>zh</language>
<item>
<title>小狼毫 0.14.3</title>
<title>小狼毫 0.15.0</title>
<sparkle:releaseNotesLink>http://rime.github.io/testing/weasel/release-notes.html</sparkle:releaseNotesLink>
<pubDate>Sat, 22 Jun 2019 22:54:50 +0800</pubDate>
<enclosure url="https://dl.bintray.com/rime/weasel/weasel-0.14.3.0-installer.exe"
sparkle:version="0.14.3"
<pubDate>Sat, 10 Jun 2023 23:00:00 +0800</pubDate>
<enclosure url="https://github.com/rime/weasel/releases/download/0.15.0/weasel-0.15.0.0-installer.exe"
sparkle:version="0.15.0"
type="application/octet-stream"/>
</item>
</channel>
Expand Down

0 comments on commit 3c423fb

Please sign in to comment.