Skip to content

Add generic git commands to git-tui command #55

Add generic git commands to git-tui command

Add generic git commands to git-tui command #55

Workflow file for this run

name: Build
on:
create:
tags:
-v*
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Tests"
strategy:
fail-fast: false
matrix:
include:
- name: Linux GCC
os: ubuntu-latest
compiler: g++-9
- name: Linux Clang
os: ubuntu-latest
compiler: clang++
- name: MacOS clang
os: macos-latest
compiler: clang++
- name: Windows MSVC
os: windows-latest
compiler: cl
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Enable MSVC command prompt"
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: "Install cmake"
uses: lukka/get-cmake@latest
- name: "Build debug mode"
run: >
mkdir build;
cd build;
cmake ..
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}
-DCMAKE_BUILD_TYPE=Debug;
cmake --build . --target git-tui;
# Create a release on new v* tags
release:
needs: test
if: ${{ github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') }}
name: "Create release"
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: "Create release"
uses: softprops/action-gh-release@v1
id: create_release
with:
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build artifact for the release
package:
name: "Build packages"
needs: release
strategy:
matrix:
include:
- os: ubuntu-latest
asset_path: build/git-tui*Linux*
- os: macos-latest
asset_path: build/git-tui*Darwin*
- os: windows-latest
asset_path: build/git-tui*Win64*
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Install cmake"
uses: lukka/get-cmake@latest
- name: "Build packages"
run: >
mkdir build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release;
cmake --build . --target package --config Release
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{ matrix.asset_path }}
overwrite: true