1- name : Create a pre -release
1+ name : Pre -release
22
33on :
4- # Trigger a beta version release (pre-release) on push to the master branch.
5- push :
6- branches :
7- - master
8- tags-ignore :
9- - " **" # Ignore all tags to prevent duplicate builds when tags are pushed.
10-
11- # Or it can be triggered manually.
4+ # Runs when manually triggered from the GitHub UI.
125 workflow_dispatch :
136
7+ # Runs when invoked by another workflow.
8+ workflow_call :
9+ outputs :
10+ changelog_commitish :
11+ description : The commit SHA after updating the changelog
12+ value : ${{ jobs.update_changelog.outputs.changelog_commitish }}
13+
1414concurrency :
1515 group : release
1616 cancel-in-progress : false
1717
1818jobs :
1919 release_metadata :
20+ if : " !startsWith(github.event.head_commit.message, 'docs') && !startsWith(github.event.head_commit.message, 'ci') && startsWith(github.repository, 'apify/')"
2021 name : Prepare release metadata
2122 runs-on : ubuntu-latest
2223 outputs :
@@ -31,36 +32,16 @@ jobs:
3132 release_type : prerelease
3233 existing_changelog_path : CHANGELOG.md
3334
34- # If github.ref points to a [ci skip] commit, this workflow won't run.
35- # Otherwise, these checks will be launched from the `run_code_checks` workflow.
36- wait_for_checks :
37- name : Wait for code checks to pass
38- runs-on : ubuntu-latest
39- steps :
40- - uses : lewagon/wait-on-check-action@v1.4.1
41- with :
42- ref : ${{ github.ref }}
43- repo-token : ${{ secrets.GITHUB_TOKEN }}
44- check-regexp : " ( check| tests)$"
45- wait-interval : 5
46-
4735 update_changelog :
4836 name : Update changelog
49- needs : [release_metadata, wait_for_checks ]
37+ needs : [release_metadata]
5038 uses : apify/workflows/.github/workflows/python_bump_and_update_changelog.yaml@main
5139 with :
5240 version_number : ${{ needs.release_metadata.outputs.version_number }}
5341 changelog : ${{ needs.release_metadata.outputs.changelog }}
5442 secrets :
5543 APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN : ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
5644
57- build_and_deploy_docs :
58- needs : [update_changelog]
59- uses : ./.github/workflows/build_and_deploy_docs.yaml
60- with :
61- ref : ${{ needs.update_changelog.outputs.changelog_commitish }}
62- secrets : inherit
63-
6445 publish_to_pypi :
6546 if : " !startsWith(github.event.head_commit.message, 'ci') && !startsWith(github.event.head_commit.message, 'docs')"
6647 name : Publish to PyPI
8061 is_prerelease : " yes"
8162 version_number : ${{ needs.release_metadata.outputs.version_number }}
8263 ref : ${{ needs.update_changelog.outputs.changelog_commitish }}
64+
8365 # Publishes the package to PyPI using PyPA official GitHub action with OIDC authentication.
8466 - name : Publish package to PyPI
8567 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments