Files
UltraGrid/.github/workflows/ccpp.yml
Martin Pulec d13024feb6 CI: handle deprecation of actions/checkout@v4
use main branch instead

As for the other GH actions, use rather the main branch than a fixed
tag. The advantage is that we can avoid these technical commits because
the Node.js actions are gradually deprecated so that we'd need to update
every time it happens (although not often).

Although the actions example suggest using the fixed tags, this
doesn't seem to cause any problems while soe time used eg for
actions/cache. Otherwise, fixed tags may be returned at any time.
2026-03-11 11:22:58 +01:00

67 lines
1.8 KiB
YAML

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2019-2026 CESNET, zájmové sdružení právnických osob
name: C/C++ CI
on:
push:
branches:
- master
tags:
- v[0-9]+.*
paths:
- '.github/scripts/**'
- '.github/workflows/ccpp.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/macos.yml'
- '.github/workflows/windows.yml'
- '**.c'
- '**.cpp'
- '**.cu'
- '**.h'
- '**.hpp'
- '**.m'
- '**.mm'
- 'autogen.sh'
- 'configure.ac'
- 'data/**'
- 'Makefile.in'
workflow_dispatch:
jobs:
prepare:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, we do not need to create own token.
steps:
- uses: actions/checkout@main
id: checkout
with:
persist-credentials: true
- name: Init environment variables
run: . .github/scripts/environment.sh
- name: Retag continuous
if: github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master'
run: |
git fetch --prune --unshallow --tags
git tag -f $TAG
git push -f origin refs/tags/$TAG:refs/tags/$TAG
- name: Update Release
if: (github.repository == 'CESNET/UltraGrid' && github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
run: .github/scripts/create_release.sh
- name: Create continuous release # ensure continuous release is present for AppImage zsync
if: startsWith(github.ref, 'refs/tags/')
run: .github/scripts/create_continuous_release.sh
Ubuntu:
needs: prepare
uses: ./.github/workflows/linux.yml
macOS:
needs: prepare
uses: ./.github/workflows/macos.yml
Windows:
needs: prepare
uses: ./.github/workflows/windows.yml