Skip to content

Commit

Permalink
Fix Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
graphemecluster committed Jan 9, 2024
1 parent 9b800cc commit 9c3bae4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- '*'
tags:
- '![0-9]+.*'
- '!*'
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
compiler: [g++, clang]
steps:
- name: Checkout last commit
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ jobs:
RIME_PLUGINS: ${{ inputs.rime_plugins }}
steps:
- name: Checkout last commit
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
submodules: recursive

- name: Configure build environment
run: |
echo git_ref_name="$(git describe --always)" >> $GITHUB_ENV
- name: Configure build variant
if: contains(inputs.build_variant, '-universal')
run: |
Expand Down Expand Up @@ -82,15 +78,15 @@ jobs:
- name: Create distributable
run: |
make xcode/dist
tar -cjvf rime-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.tar.bz2 \
tar -cjvf rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2 \
dist version-info.txt
tar -cjvf rime-deps-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.tar.bz2 \
tar -cjvf rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2 \
--exclude '*/.placeholder' \
bin include lib share
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: |
rime-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.tar.bz2
rime-deps-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.tar.bz2
rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2
rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2
13 changes: 3 additions & 10 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Release CI

on:
workflow_dispatch:
push:
tags:
- '[0-9]+.*'
- '*'

jobs:
linux:
Expand All @@ -25,15 +24,9 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3

- name: Get version name
run: |
echo rime_version="$(git describe --always)" >> $env:GITHUB_ENV
- name: Create GitHub release
uses: 'marvinpinto/action-automatic-releases@latest'
uses: softprops/action-gh-release@v1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ env.rime_version }}
title: "librime for TypeDuck: ${{ env.rime_version }}"
name: "librime for TypeDuck: ${{ github.ref_name }}"
files: |
artifact/*
11 changes: 5 additions & 6 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ jobs:
RIME_PLUGINS: ${{ inputs.rime_plugins }}
steps:
- name: Checkout last commit
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
submodules: recursive

- name: Configure build environment
run: |
copy env.vs2022.bat env.bat
echo git_ref_name="$(git describe --always)" >> $env:GITHUB_ENV
- name: Cache Boost
id: cache-boost
Expand Down Expand Up @@ -74,14 +73,14 @@ jobs:

- name: Create distributable
run: |
7z a rime-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.7z `
7z a rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.7z `
dist version-info.txt
7z a -x'!*/.placeholder' rime-deps-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.7z `
7z a -x'!*/.placeholder' rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.7z `
bin include lib share
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: |
rime-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.7z
rime-deps-TypeDuck-${{ env.git_ref_name }}-${{ runner.os }}.7z
rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.7z
rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.7z
2 changes: 1 addition & 1 deletion action-install-plugins-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export RIME_ROOT="$(cd "$(dirname "$0")"; pwd)"

echo "RIME_PLUGINS=${RIME_PLUGINS}" > version-info.txt
echo "librime $(git describe --always)" >> version-info.txt
echo "librime ${GITHUB_REF_NAME}" >> version-info.txt

function action_install_plugin() {
local plugin="$1"
Expand Down
3 changes: 1 addition & 2 deletions action-install-plugins-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ set clone_options=^
--no-single-branch

echo RIME_PLUGINS=%RIME_PLUGINS% > version-info.txt
echo librime >> version-info.txt
git describe --always >> version-info.txt
echo librime %GITHUB_REF_NAME% >> version-info.txt

if defined RIME_PLUGINS (
for %%s in (%RIME_PLUGINS%) do call :install_plugin %%s || exit /b
Expand Down

0 comments on commit 9c3bae4

Please sign in to comment.