Release #14
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: | |
- '*' | |
jobs: | |
buildMac: | |
name: Build macOS | |
runs-on: macOS-latest | |
strategy: | |
matrix: | |
xcode: [ Xcode_12.2 ] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Investigate available XCode versions | |
run: ls -n /Applications/ | grep Xcode* | |
- name: Set XCode Version | |
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app | |
- name: install qt | |
run: brew install qt | |
- name: install build environment | |
run: scripts/install.sh | |
- name: Build project | |
run: scripts/build.sh | |
- name: Archive artifact | |
run: zip DLT-macOS.zip -r build/release | |
- name: Upload DLT artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: DLT-Mac | |
path: DLT-macOS.zip | |
buildLinux: | |
name: Build ${{ matrix.ubuntu }} | |
strategy: | |
matrix: | |
ubuntu: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.ubuntu }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: install build environment | |
run: scripts/install.sh | |
- name: Build project | |
run: scripts/build.sh | |
- name: Make artifact executable | |
run: chmod -R +x build/release | |
- name: Archive artifact | |
run: zip DLT-Linux.zip -r build/release | |
- name: Upload DLT artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: DLT-Linux | |
path: DLT-Linux.zip | |
buildWindows: | |
name: Build Windows | |
strategy: | |
matrix: | |
task: [ parser, sdk ] | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Install qt | |
uses: jurplel/install-qt-action@v2 | |
with: | |
mirror: http://ftp.fau.de/qtproject/ | |
version: 5.12.10 | |
- name: Build ${{ matrix.task }} | |
run: $env:WORKSPACE=$env:GITHUB_WORKSPACE; $env:QTDIR=$env:Qt5_DIR.Replace('/','\'); ./build_${{ matrix.task }}_windows_qt5_MSVC.bat | |
#- name: Archive artifact | |
# run: call cabDir.bat ./build/dist DLT-Windows-${{ matrix.task }}.cab | |
createRelease: | |
name: Create release | |
runs-on: ubuntu-20.04 | |
needs: [ buildMac, buildLinux, buildWindows ] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Download DLT Linux artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: DLT-Linux | |
- name: Download DLT macOS artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: DLT-Mac | |
- run: | | |
assetsZip=$(find . -name 'DLT*.zip' | while read -r asset ; do echo "-a $asset" ; done) | |
VERSION=$(echo $VERSION | cut -d'/' -f3) | |
tag_name="${GITHUB_REF##*/}" | |
hub release create ${assetsZip} -m "$tag_name" "$tag_name" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ github.ref }} |