62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
name: CI (master)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags-ignore:
|
|
- "**" # Ignore all tags to avoid duplicate executions triggered by tag pushes.
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
doc_checks:
|
|
name: Doc checks
|
|
uses: ./.github/workflows/_check_docs.yaml
|
|
|
|
doc_release:
|
|
# Skip this for non-"docs" commits.
|
|
if: startsWith(github.event.head_commit.message, 'docs')
|
|
name: Doc release
|
|
needs: [doc_checks]
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
id-token: write
|
|
uses: ./.github/workflows/manual_release_docs.yaml
|
|
secrets: inherit
|
|
|
|
code_checks:
|
|
name: Code checks
|
|
uses: ./.github/workflows/_check_code.yaml
|
|
|
|
tests:
|
|
# Skip this for "docs" commits.
|
|
if: "!startsWith(github.event.head_commit.message, 'docs')"
|
|
name: Tests
|
|
uses: ./.github/workflows/_tests.yaml
|
|
secrets: inherit
|
|
|
|
# The beta release is dispatched as a separate workflow run (instead of calling `manual_release_beta.yaml` via `uses:`)
|
|
# because PyPI's Trusted Publishing does not currently support reusable workflows.
|
|
# See: https://docs.pypi.org/trusted-publishers/troubleshooting/#reusable-workflows-on-github
|
|
beta_release:
|
|
# Run this only for "feat", "fix", "perf", "refactor" and "style" commits.
|
|
if: >-
|
|
startsWith(github.event.head_commit.message, 'feat') ||
|
|
startsWith(github.event.head_commit.message, 'fix') ||
|
|
startsWith(github.event.head_commit.message, 'perf') ||
|
|
startsWith(github.event.head_commit.message, 'refactor') ||
|
|
startsWith(github.event.head_commit.message, 'style')
|
|
name: Beta release
|
|
needs: [code_checks, tests]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
actions: write # Required by execute-workflow.
|
|
steps:
|
|
- name: Dispatch beta release workflow
|
|
uses: apify/actions/execute-workflow@v1.1.2
|
|
with:
|
|
workflow: manual_release_beta.yaml
|