Release v3.1.1 #113
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
DOCKER_BUILDKIT: 1 | |
jobs: | |
create-release: | |
runs-on: ubuntu-20.04 | |
outputs: | |
url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- name: Create draft release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
build-engine: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build engine | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libclang-10-dev | |
cargo build --release -p kime-engine-capi | |
LD_LIBRARY_PATH=$PWD/target/release cargo build --release -p kime-check | |
strip -s ./target/release/libkime_engine.so | |
strip -s ./target/release/kime-check | |
- name: Upload cpp header | |
uses: actions/upload-artifact@v2 | |
with: | |
name: cpp-header | |
path: ./src/engine/cffi/kime_engine.hpp | |
- name: Upload engine | |
uses: actions/upload-artifact@v2 | |
with: | |
name: engine | |
path: ./target/release/libkime_engine.so | |
- name: Upload check | |
uses: actions/upload-artifact@v2 | |
with: | |
name: check | |
path: ./target/release/kime-check | |
build-other: | |
needs: | |
- build-engine | |
- create-release | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libclang-10-dev | |
sudo apt-get install -y libgtk-3-dev | |
- name: Download engine | |
uses: actions/download-artifact@v2 | |
with: | |
name: engine | |
path: . | |
- name: Download check | |
uses: actions/download-artifact@v2 | |
with: | |
name: check | |
path: . | |
- name: Build | |
run: | | |
sudo mv ./libkime_engine.so /usr/lib | |
KIME_SKIP_ENGINE=1 scripts/build.sh -ar | |
cp /usr/lib/libkime_engine.so ./build/out | |
mv ./kime-check ./build/out | |
scripts/release-zst.sh . | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: other | |
path: ./build/out/* | |
- name: Upload zst | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.url }} | |
asset_path: ./kime.tar.zst | |
asset_name: kime-${{ github.ref }}.tar.zst | |
asset_content_type: application/zstd | |
build-qt5: | |
needs: | |
- build-engine | |
- create-release | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
# 5.15.3 doesn't have binary release | |
qt5: | |
- 5.9.5 | |
- 5.11.3 | |
- 5.12.8 | |
- 5.12.9 | |
- 5.14.2 | |
- 5.15.2 | |
steps: | |
- name: Download engine | |
uses: actions/download-artifact@v2 | |
with: | |
name: engine | |
path: . | |
- name: Download header | |
uses: actions/download-artifact@v2 | |
with: | |
name: cpp-header | |
path: . | |
- name: Install engine | |
run: | | |
sudo mv ./libkime_engine.so /usr/lib | |
sudo mv ./kime_engine.hpp /usr/include | |
- name: Install Qt-${{ matrix.qt5 }} | |
uses: jurplel/install-qt-action@v4 | |
with: | |
dir: /opt | |
version: ${{ matrix.qt5 }} | |
- uses: actions/checkout@v4 | |
- name: Build Qt-${{ matrix.qt5 }} | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_QT5=ON ../src | |
make -j$(nproc --all) | |
strip -s ./lib/libkime-qt5.so | |
- name: Upload Qt-${{ matrix.qt5 }} artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: qt-${{matrix.qt5}} | |
path: build/lib/libkime-qt5.so | |
- name: Upload Qt-${{ matrix.qt5 }} file | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.url }} | |
asset_path: build/lib/libkime-qt5.so | |
asset_name: libkime-qt-${{ matrix.qt5 }}.so | |
asset_content_type: application/x-sharedlib | |
build-qt6: | |
needs: | |
- build-engine | |
- create-release | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
qt6: | |
- 6.0.2 | |
steps: | |
- name: Download engine | |
uses: actions/download-artifact@v2 | |
with: | |
name: engine | |
path: . | |
- name: Download header | |
uses: actions/download-artifact@v2 | |
with: | |
name: cpp-header | |
path: . | |
- name: Install engine | |
run: | | |
sudo mv ./libkime_engine.so /usr/lib | |
sudo mv ./kime_engine.hpp /usr/include | |
- name: Install Qt-${{ matrix.qt6 }} | |
uses: jurplel/install-qt-action@v4 | |
with: | |
dir: /opt | |
version: ${{ matrix.qt6 }} | |
- uses: actions/checkout@v4 | |
- name: Build Qt-${{ matrix.qt6 }} | |
run: | | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_QT6=ON ../src | |
make -j$(nproc --all) | |
strip -s ./lib/libkime-qt6.so | |
- name: Upload Qt-${{ matrix.qt6 }} artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: qt-${{matrix.qt6}} | |
path: build/lib/libkime-qt6.so | |
- name: Upload Qt-${{ matrix.qt6 }} file | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.url }} | |
asset_path: build/lib/libkime-qt6.so | |
asset_name: libkime-qt-${{ matrix.qt6 }}.so | |
asset_content_type: application/x-sharedlib | |
package-archive: | |
needs: | |
- build-other | |
- build-qt5 | |
- build-qt6 | |
- create-release | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- qt5: 5.9.5 | |
pkg: deb | |
name: ubuntu-18.04 | |
- qt5: 5.12.8 | |
pkg: deb | |
name: ubuntu-20.04 | |
- qt5: 5.14.2 | |
pkg: deb | |
name: ubuntu-20.10 | |
- qt5: 5.15.2 | |
pkg: deb | |
name: ubuntu-22.04 | |
- qt5: 5.11.3 | |
pkg: deb | |
name: debian-buster | |
- qt5: 5.15.2 | |
qt6: 6.0.2 | |
pkg: zst | |
name: latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create out folder | |
run: mkdir -pv ./build/out | |
- name: Download qt5 artifact | |
if: ${{ matrix.qt5 }} | |
uses: actions/download-artifact@v2 | |
with: | |
name: qt-${{ matrix.qt5 }} | |
path: ./build/out | |
- name: Download qt6 artifact | |
if: ${{ matrix.qt6 }} | |
uses: actions/download-artifact@v2 | |
with: | |
name: qt-${{ matrix.qt6 }} | |
path: ./build/out | |
- name: Download other artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: other | |
path: ./build/out | |
- name: Create deb | |
if: ${{ matrix.pkg == 'deb' }} | |
run: scripts/release-deb.sh . | |
- name: Upload deb | |
if: ${{ matrix.pkg == 'deb' }} | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.url }} | |
asset_path: ./kime_amd64.deb | |
asset_name: kime_${{ matrix.name }}_${{ github.ref }}_amd64.deb | |
asset_content_type: application/x-xz | |
- name: Create zst | |
if: ${{ matrix.pkg == 'zst' }} | |
run: scripts/release-zst.sh . | |
- name: Upload zst | |
if: ${{ matrix.pkg == 'zst' }} | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.url }} | |
asset_path: ./kime.tar.zst | |
asset_name: kime_${{ matrix.name }}_${{ github.ref }}.tar.zst | |
asset_content_type: application/zstd |