Skip to content

Commit 0c4d18d

Browse files
0x1b2cclaude
andcommitted
Run CI on every push and consolidate release into one workflow
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6ce0f98 commit 0c4d18d

2 files changed

Lines changed: 69 additions & 54 deletions

File tree

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main, master]
9+
10+
jobs:
11+
build:
12+
runs-on: macos-15
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Bootstrap (submodules + dictionaries)
24+
run: make bootstrap
25+
26+
- name: Build
27+
run: make build
28+
29+
- name: Test
30+
run: make test
31+
32+
release:
33+
needs: build
34+
if: startsWith(github.ref, 'refs/tags/v')
35+
runs-on: macos-15
36+
permissions:
37+
contents: write
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 0
42+
fetch-tags: true
43+
submodules: recursive
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.x'
49+
50+
- name: Bootstrap (submodules + dictionaries)
51+
run: make bootstrap
52+
53+
- name: Build and package
54+
run: make dist
55+
56+
- name: Extract tag annotation
57+
id: tag_msg
58+
run: |
59+
git fetch origin tag ${GITHUB_REF_NAME} --no-tags --force
60+
echo "body<<ENDOFBODY" >> $GITHUB_OUTPUT
61+
git for-each-ref "refs/tags/${GITHUB_REF_NAME}" --format='%(contents)' >> $GITHUB_OUTPUT
62+
echo "ENDOFBODY" >> $GITHUB_OUTPUT
63+
64+
- name: Create Release
65+
uses: softprops/action-gh-release@v2
66+
with:
67+
name: Linguist Zixia Input ${{ github.ref_name }}
68+
files: build/LinguistZixiaInput-*.zip
69+
body: ${{ steps.tag_msg.outputs.body }}

.github/workflows/release.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)