-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] Makefile rewrite & Auto build release (#32)
1. 改进构建方式,重写 Makefile 2. 支持推送时自动构建 Release 3. 修改中文 README
- Loading branch information
Showing
11 changed files
with
66 additions
and
84,541 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: autorelease | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install tools | ||
run: sudo apt-get install gettext | ||
|
||
- name: Make .mo | ||
run: make | ||
|
||
- name: Bump version and push tag | ||
id: bump | ||
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: build/* | ||
fail_on_unmatched_files: true | ||
tag_name: ${{ steps.bump.outputs.new_tag }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
.PHONY: all | ||
all: merge-zh gcc.mo install | ||
gcc.mo: gcc-zh.po | ||
msgfmt gcc-zh.po -o gcc.mo | ||
all: zh-origin zh-kawaii ja-kawaii | ||
|
||
install: | ||
cp gcc.mo /usr/share/locale/zh_CN/LC_MESSAGES/gcc.mo | ||
build: | ||
mkdir -p build | ||
|
||
merge-zh: src/zh-kawaii.po | ||
msgcat -o gcc-zh.po --no-wrap --use-first src/zh-kawaii.po src/zh_CN.po | ||
testmo: | ||
cd test && ./test.sh | ||
%: src/%.po | build | ||
msgfmt -o build/$*.mo $< | ||
|
||
src/zh-kawaii.po: src/zh-origin.po src/zh-kawaii-patch.po | ||
msgcat -o src/zh-kawaii.po --no-wrap --use-first src/zh-kawaii-patch.po src/zh-origin.po | ||
|
||
.PHONY: clean | ||
clean: gcc.mo | ||
rm -rf gcc.mo | ||
clean: | ||
rm src/zh-kawaii.po | ||
rm -rf build |
This file contains 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
Oops, something went wrong.