Skip to content

Test PR #25

Test PR #25 #137

Workflow file for this run

name: "CI"
run-name: |
${{
(github.event_name == 'pull_request' && format('Test PR #{0}', github.event.pull_request.number)) ||
(github.ref_name == github.event.repository.default_branch && 'Release') ||
format('Test branch "{0}"', github.ref_name)
}}
on:
workflow_dispatch:
pull_request:
push:
branches: ["master"]
concurrency:
group: "${{ github.workflow }}-${{ github.ref_name }}"
cancel-in-progress: "${{ github.ref_name != github.event.repository.default_branch }}"
jobs:
create-semantic-tag:
runs-on: "ubuntu-latest"
outputs:
RELEASE_VERSION: "${{ steps.create-tag.outputs.VERSION }}"
steps:
- uses: "actions/checkout@v4"
- name: "Create semantic tag"
id: "create-tag"
run: |
if [ "${{ github.ref_name == github.event.repository.default_branch }}" != "true" ]; then
echo "Skipping tagging because it's not the default branch"
exit 0
fi
VERSION=$(git log -1 --pretty=%B | sed -nE 's/.*[Rr]elease ([0-9]+\.[0-9]+\.[0-9]+).*?/\1/p')
if [ -z "${VERSION}" ]; then
echo "No semantic version found in commit message"
exit 0
fi
echo "Adding semantic tag ${VERSION}..."
git tag "${VERSION}"
git push --tags
echo "VERSION=${VERSION}" >> "${GITHUB_OUTPUT}"
test:
needs: ["create-semantic-tag"]
uses: "./.github/workflows/test.yml"
secrets: "inherit"
build:
needs: ["test"]
uses: "./.github/workflows/build.yml"
release-latest:
if: "${{ github.ref_name == github.event.repository.default_branch }}"
needs: ["build"]
uses: "./.github/workflows/release.yml"
with:
release_name: "latest"
release-version:
if: "${{ needs.create-semantic-tag.outputs.RELEASE_VERSION != '' }}"
needs: ["create-semantic-tag", "build"]
uses: "./.github/workflows/release.yml"
with:
release_name: "${{ needs.create-semantic-tag.outputs.RELEASE_VERSION }}"
deploy-docs:
needs: ["release-latest"]
uses: "./.github/workflows/doc.yml"