Skip to content

Fixed app about information and translator names #16

Fixed app about information and translator names

Fixed app about information and translator names #16

Workflow file for this run

name: Build
on:
push:
branches:
- '*'
tags:
- 'v[0-9]*'
pull_request:
branches:
- '*'
defaults:
run:
shell: bash
env:
BUILD_TYPE: Release
APP_NAME: qruler
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
config:
- { name: "GCC", cc: gcc, cxx: g++ }
- { name: "clang", cc: clang, cxx: clang++ }
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
steps:
- name: Set Archive Name
if: ${{ matrix.config.cc == 'gcc' }}
run: |
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
echo "INSTALL_NAME=$APP_NAME-${GITHUB_REF##*/}-linux" >> "$GITHUB_ENV"
- uses: actions/checkout@v2
- name: Update Packages
run: sudo apt-get update
- name: Install Dependencies
run: |
packages=(
qtbase5-dev
qttools5-dev
lxqt-build-tools
)
sudo apt-get install ${packages[@]}
- name: Configure
run: |
options=(
-D CMAKE_INSTALL_PREFIX="/usr"
-D CMAKE_BUILD_TYPE="$BUILD_TYPE"
-B ${{ runner.workspace }}/build
)
cmake ${options[@]}
- name: Build
run: cmake --build ${{ runner.workspace }}/build --config "$BUILD_TYPE"
- name: Install
if: ${{ matrix.config.cc == 'gcc' }}
working-directory: ${{ runner.workspace }}/build
run: |
DESTDIR="$(pwd)/$INSTALL_NAME" cmake --build . --config "$BUILD_TYPE" --target install
tar czvf "$INSTALL_NAME".tar.gz "$INSTALL_NAME"
- name: Upload Artifacts
if: ${{ matrix.config.cc == 'gcc' }}
uses: actions/upload-artifact@v2
with:
name: Linux Artifacts
path: ${{ runner.workspace }}/build/${{ env.INSTALL_NAME }}.tar.gz
deploy:
name: Deployment
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- linux
steps:
- name: Set Environment Variables
run: echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
- uses: actions/download-artifact@v2
with:
name: Linux Artifacts
- name: Display File Information
run: ls -lR
# Note: not using `actions/create-release@v1`
# because it cannot update an existing release
# see https://github.com/actions/create-release/issues/29
- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.INSTALL_REF }}
name: Release ${{ env.INSTALL_REF }}
draft: false
prerelease: false
files: |
${{ env.APP_NAME }}-${{ env.INSTALL_REF }}-*