Skip to content

Commit

Permalink
macos stable release !windows !js
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Mar 2, 2025
1 parent 25b20f2 commit e534f00
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
tags:
- 'macos-[0-9]+.*'
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -34,11 +36,13 @@ jobs:
- name: Pass commit message
id: commit-message
run: |
if [[ "${{ github.ref }}" == 'refs/heads/master' ]]; then
if [[ "${{ github.event_name }}" == 'pull_request' ]]; then
echo "message=${{ github.event.pull_request.title }}" >> "$GITHUB_OUTPUT"
elif [[ "${{ github.ref }}" == 'refs/heads/master' ]]; then
message=$(echo "${{ github.event.head_commit.message }}" | head -n 1)
echo "message=$message" >> "$GITHUB_OUTPUT"
else
echo "message=${{ github.event.pull_request.title }}" >> "$GITHUB_OUTPUT"
echo "message=!windows!js" >> "$GITHUB_OUTPUT"
fi
macos:
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ jobs:
- name: Install Fcitx5 dev package
run: |
wget https://github.com/fcitx-contrib/fcitx5-macos/releases/download/latest/Fcitx5-${{ matrix.arch }}-dev.tar.bz2
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then
tag=latest
else
ref_name=${{ github.ref_name }}
tag=${ref_name#macos-}
fi
wget https://github.com/fcitx-contrib/fcitx5-macos/releases/download/$tag/Fcitx5-${{ matrix.arch }}-dev.tar.bz2
sudo tar xjf Fcitx5-${{ matrix.arch }}-dev.tar.bz2 -C "/Library/Input Methods"
- name: Build
Expand Down Expand Up @@ -98,14 +104,14 @@ jobs:

compare:
needs: build
if: ${{ github.ref != 'refs/heads/master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/compare.yml
with:
platform: macos

release:
needs: build
if: ${{ github.ref == 'refs/heads/master' }}
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Download artifact
Expand All @@ -118,9 +124,9 @@ jobs:
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: macos
prerelease: true
title: "macOS Build"
automatic_release_tag: ${{ github.ref == 'refs/heads/master' && 'macos-latest' || github.ref_name }}
prerelease: ${{ github.ref == 'refs/heads/master' }}
title: ${{ github.ref == 'refs/heads/master' && 'macos-latest' || github.ref_name }}
files: |
*.tar.bz2
meta-arm64.json
Expand Down

0 comments on commit e534f00

Please # to comment.