-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- see #356
- Loading branch information
Showing
15 changed files
with
215 additions
and
304 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,9 @@ jobs: | |
github.event_name == 'workflow_dispatch' || | ||
( | ||
github.event_name == 'push' && | ||
!startsWith(github.event.head_commit.message, 'docs') && | ||
!startsWith(github.event.head_commit.message, 'chore') | ||
!startsWith(github.event.head_commit.message, 'docs:') && | ||
!startsWith(github.event.head_commit.message, 'chore:') && | ||
!startsWith(github.event.head_commit.message, 'ci:') | ||
) | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -74,7 +75,9 @@ jobs: | |
contents: write | ||
id-token: write # Required for OIDC authentication. | ||
outputs: | ||
changelog_commitish: ${{ steps.push.commitish }} | ||
changelog_commitish: ${{ steps.commit.commit_long_sha || github.sha }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -89,11 +92,6 @@ jobs: | |
- name: Install git-cliff | ||
run: pip install git-cliff | ||
|
||
- name: Set up git | ||
run: | | ||
git config --global user.name "Apify Release Bot" | ||
git config --global user.email "[email protected]" | ||
- name: Generate changelog with git-cliff | ||
run: | | ||
if [[ ${{ github.event_name }} = workflow_dispatch ]]; then | ||
|
@@ -102,18 +100,27 @@ jobs: | |
git-cliff --with-tag-message v${{ needs.should_release.outputs.version_number }} > CHANGELOG.md | ||
fi | ||
- name: Commit and push the result | ||
id: push | ||
run: | | ||
git commit -am "chore(release): Update changelog [skip ci]" || true | ||
git push origin master || true | ||
echo commitish=$(git rev-parse HEAD) | tee -a $GITHUB_OUTPUT | ||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Update package version in pyproject.toml | ||
run: poetry version ${{ needs.should_release.outputs.version_number }} | ||
|
||
- name: Commit changes | ||
id: commit | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Apify Release Bot | ||
author_email: [email protected] | ||
message: 'chore(release): Update changelog and package version [skip ci]' | ||
|
||
create_github_release: | ||
name: Create github release | ||
if: github.event_name == 'workflow_dispatch' | ||
needs: [update_changelog, should_release] | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -140,8 +147,10 @@ jobs: | |
|
||
publish_to_pypi: | ||
name: Publish to PyPI | ||
needs: [create_github_release] | ||
needs: [should_release] | ||
uses: ./.github/workflows/_publish_to_pypi.yaml | ||
with: | ||
version_number: ${{ needs.should_release.outputs.version_number }} | ||
|
||
# TODO: add job for publish package to Conda | ||
# https://github.com/apify/crawlee-py/issues/104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.