Skip to content

- Update workflow

- Update workflow #9

Workflow file for this run

name: Studio26F Main CI
permissions: write-all
on:
push:
branches: [ ci-*, main ]
tags: [ pre*, v* ]
pull_request:
branches: [ main ]
jobs:
get-info:
runs-on: ubuntu-latest
outputs:
commitHash: ${{ steps.git-info.outputs.commitHash }}
steps:
- uses: actions/checkout@v4
- name: Get git info
id: git-info
shell: bash
run: |
COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }})
echo "commitHash=$COMMIT_HASH" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: get-info
env:
OUTPUT_FOLDER: ./build
RELEASE_FOLDER: ./release
strategy:
matrix:
config: [ Debug, Release ]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: CMake Configure and Build
run: |
ls /usr/bin/gcc*
cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}/${{ env.OUTPUT_FOLDER }}"
cmake --build "${{ github.workspace }}/${{ env.OUTPUT_FOLDER }}" --target Studio26F --config ${{ matrix.config }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Studio26F_${{ needs.get-info.outputs.commitHash }}_${{ GITHUB.RUN_NUMBER }}_${{ matrix.config }}
path: "${{ env.OUTPUT_FOLDER }}/${{ matrix.config }}"
- name: Prepare for release
if: ${{ (startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v')) && matrix.config == 'release'}}
shell: bash
run: |
mkdir -p ${{ env.RELEASE_FOLDER }}
cp ${{ env.OUTPUT_FOLDER }}/${{ matrix.config }}/Studio26F ${{ env.RELEASE_FOLDER }}
- name: Upload release
if: ${{ (startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v')) && matrix.config == 'release'}}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: |
${{ env.RELEASE_FOLDER }}/*
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}