Skip to content

Merge branch 'develop' #19

Merge branch 'develop'

Merge branch 'develop' #19

Workflow file for this run

name: matador@linux:release
on:
push:
tags:
- 'v*'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name: "Ubuntu Latest GCC-9"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler-version: [9]
steps:
- name: Install Doxygen
run: |
sudo apt-get -y install doxygen
which doxygen
- name: Set version name
id: version
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/}
- uses: actions/checkout@v2
- name: CMake Version
run: cmake --version
- name: Configure CMake
env:
CC: gcc-${{ matrix.compiler-version }}
CXX: g++-${{ matrix.compiler-version }}
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DMATADOR_ODBC=true
-DCOVERAGE=false
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target matador
- name: Build Documentation
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --target web
- name: Build Packages
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --target package
- name: List Packages
working-directory: ${{github.workspace}}/Package
run: ls -la
- name: Upload Debian Artifacts
uses: actions/upload-artifact@v2
with:
name: matador-${{ steps.version.outputs.name }}-x86_64-${{ runner.os }}.deb
path: ${{github.workspace}}/Package/matador*.deb
- name: Upload RPM Artifacts
uses: actions/upload-artifact@v2
with:
name: matador-${{ steps.version.outputs.name }}-x86_64-${{ runner.os }}.rpm
path: ${{github.workspace}}/Package/matador*.rpm
- name: Upload TGZ Artifacts
uses: actions/upload-artifact@v2
with:
name: matador-${{ steps.version.outputs.name }}-x86_64-${{ runner.os }}.tar.gz
path: ${{github.workspace}}/Package/matador*.tar.gz
release:
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
needs: build
steps:
- name: set version name
id: version
run: echo ::set-output name=name::${GITHUB_REF#refs/tags/}
- name: set matador version name
id: matador_version
run: |
ver=$(echo ${GITHUB_REF#refs/tags/} | cut -b 2-)
echo "::set-output name=id::$ver"
- run: echo "${{steps.matador_version.outputs.id}}"
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.version.outputs.name }}
# if needed, you can set the release body here
#body: "Release notes"
draft: false
prerelease: false
- name: Download Debian Artifact
uses: actions/download-artifact@v2
with:
name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.deb"
path: ./
- name: Display structure of downloaded files
run: ls -R
- name: Upload Debian Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "matador-${{ steps.matador_version.outputs.id }}-x86_64-linux.deb"
asset_name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.deb"
asset_content_type: application/x-deb
- name: Download RPM Artifact
uses: actions/download-artifact@v2
with:
name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.rpm"
path: ./
- name: Upload RPM Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "matador-${{ steps.matador_version.outputs.id }}-x86_64-linux.rpm"
asset_name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.rpm"
asset_content_type: application/x-rpm
- name: Download TGZ Artifact
uses: actions/download-artifact@v2
with:
name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.tar.gz"
path: ./
- name: Upload TGZ Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "matador-${{ steps.matador_version.outputs.id }}-x86_64-linux.tar.gz"
asset_name: "matador-${{ steps.version.outputs.name }}-x86_64-Linux.tar.gz"
asset_content_type: application/x-tar