Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflows/node-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

publish:
outputs:
bumped-version-commit-sha: ${{ steps.commit.outputs.commit_long_sha || github.sha }}
bumped-version-commit-sha: ${{ steps.commit.outputs.commit_long_sha }}
new_version: ${{ steps.get-new-version.outputs.TARGET_VERSION }}
defaults:
run:
Expand Down Expand Up @@ -87,13 +87,22 @@ jobs:

- name: Commit changes
id: commit
uses: EndBug/add-and-commit@v10
uses: apify/actions/signed-commit@v1.1.2
with:
author_name: Apify Release Bot
author_email: noreply@apify.com
message: "chore(js-release): Update package version [skip ci]"
tag: "js-${{ steps.get-new-version.outputs.TARGET_VERSION }}"
pull: '--rebase --autostash'
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Create version tag
working-directory: .
env:
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
TAG_NAME: "js-${{ steps.get-new-version.outputs.TARGET_VERSION }}"
COMMIT_SHA: ${{ steps.commit.outputs.commit_long_sha }}
run: |
gh api -X POST "repos/${GITHUB_REPOSITORY}/git/refs" \
-f ref="refs/tags/${TAG_NAME}" \
-f sha="${COMMIT_SHA}"
Comment on lines +96 to +105
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice if apify/actions/signed-commit had this feature in-built (you can sign git tags too after all - docs).

This is not blocking this PR for me, though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍 PRs are welcome 😅


changelog:
name: Generate changelog
Expand All @@ -119,13 +128,12 @@ jobs:

- name: Commit new changelog
id: commit_changelog
uses: EndBug/add-and-commit@v10
uses: apify/actions/signed-commit@v1.1.2
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: "docs: update changelog [skip ci]"
add: 'impit-node/CHANGELOG.md'
add: impit-node/CHANGELOG.md
pull: '--rebase --autostash'
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Create release
uses: softprops/action-gh-release@v2
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/python-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
get_version:
runs-on: ubuntu-latest
outputs:
bumped-version-commit-sha: ${{ steps.commit_version.outputs.commit_long_sha || github.sha }}
bumped-version-commit-sha: ${{ steps.commit_version.outputs.commit_long_sha }}
new_version: ${{ steps.increment_version.outputs.new_version }}
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -58,14 +58,22 @@ jobs:

- name: Commit new version
id: commit_version
uses: EndBug/add-and-commit@v10
uses: apify/actions/signed-commit@v1.1.2
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: "chore(py-release): bump `pyproject.toml` version [skip ci]"
add: 'impit-python/pyproject.toml'
tag: "py-${{ steps.increment_version.outputs.new_version }}"
add: impit-python/pyproject.toml
pull: '--rebase --autostash'
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Create version tag
env:
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
TAG_NAME: "py-${{ steps.increment_version.outputs.new_version }}"
COMMIT_SHA: ${{ steps.commit_version.outputs.commit_long_sha }}
run: |
gh api -X POST "repos/${GITHUB_REPOSITORY}/git/refs" \
-f ref="refs/tags/${TAG_NAME}" \
-f sha="${COMMIT_SHA}"

test:
needs: [get_version]
Expand Down Expand Up @@ -115,7 +123,7 @@ jobs:
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
ref: master
fetch-depth: 0

- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
Expand All @@ -128,13 +136,12 @@ jobs:

- name: Commit new changelog
id: commit_changelog
uses: EndBug/add-and-commit@v10
uses: apify/actions/signed-commit@v1.1.2
with:
author_name: github-actions[bot]
author_email: github-actions[bot]@users.noreply.github.com
message: "docs: update changelog [skip ci]"
add: 'impit-python/CHANGELOG.md'
add: impit-python/CHANGELOG.md
pull: '--rebase --autostash'
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}

- name: Create release
uses: softprops/action-gh-release@v2
Expand Down
Loading