forked from rime/squirrel
-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (51 loc) · 1.52 KB
/
release-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: release ci
on:
push:
tags:
- '*'
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: macos-14
env:
SQUIRREL_BUNDLED_RECIPES: 'lotem/rime-octagram-data lotem/rime-octagram-data@hant'
steps:
- name: Checkout last commit
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install clang-format
run: brew install clang-format
- name: Lint
run: make clang-format-lint
- name: Build Squirrel
run: ./action-build.sh archive
- name: Build changelog
id: release_log
run: |
echo 'changelog<<EOF' >> $GITHUB_OUTPUT
./action-changelog.sh >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
if: startsWith(github.ref, 'refs/tags/')
- name: Create release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
artifacts: "package/*.zip"
body: |
${{ steps.release_log.outputs.changelog }}
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create nightly release
if: ${{ github.repository == 'rime/squirrel' && github.ref == 'refs/heads/master' }}
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Nightly build"
files: |
package/*.zip