Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"how to release", add gh command to trigger workflow #1387

Closed
wants to merge 3 commits into from
Closed
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
41 changes: 41 additions & 0 deletions mkdocs/docs/how-to-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ Run the [`Python release` Github Action](https://github.com/apache/iceberg-pytho
* Tag: Use the newly created tag.
* Version: Set the `version` to `main`, as the source cannot be modified.

Or if `gh` is available, trigger the action using:

```bash
gh workflow run python-release.yml --repo apache/iceberg-python --ref ${GIT_TAG} --field version=main
Copy link
Contributor

Choose a reason for hiding this comment

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

How about instead of having to trigger this manually, we could also trigger this by the tag creation. That's one of the first steps of the RC process: https://py.iceberg.apache.org/how-to-release/#create-tag This would trigger a job without having to do anything manual, similar to Iceberg-Go: https://github.com/apache/iceberg-go/blob/c1ffe04d56e31e475b52ce75fcbf16818a6e1169/.github/workflows/rc.yml#L24-L25

SVN_RUN_ID=$(gh run list --repo apache/iceberg-python --json databaseId -q '.[0].databaseId')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this takes the latest run, would that be safe? Or should we do some more filtering

echo "Waiting for workflow to complete, this will take several minutes..."
gh run watch $SVN_RUN_ID --repo apache/iceberg-python
```

![Github Actions Run Workflow for SVN Upload](assets/images/ghactions-run-workflow-svn-upload.png)

This action will generate:
Expand All @@ -141,6 +150,13 @@ This action will generate:

Download the ZIP file containing the artifacts from the GitHub Actions run and unzip it.

Or if `gh` is available, download the artifacts using:

```bash
# download artifact to current directory
gh run download $SVN_RUN_ID --repo apache/iceberg-python
```

Navigate to the release directory. Sign the files and generate checksums:

* `.asc` files: GPG-signed versions of each artifact to ensure authenticity.
Expand Down Expand Up @@ -190,12 +206,28 @@ Run the [`Python release` Github Action](https://github.com/apache/iceberg-pytho
* Tag: Use the newly created tag.
* Version: Set the `version` to release candidate, e.g. `0.7.0rc1`.

Or if `gh` is available, trigger the action using:

```bash
gh workflow run python-release.yml --repo apache/iceberg-python --ref ${GIT_TAG} --field version=${VERSION}
PYPI_RUN_ID=$(gh run list --repo apache/iceberg-python --json databaseId -q '.[0].databaseId')
echo "Waiting for workflow to complete, this will take several minutes..."
gh run watch $PYPI_RUN_ID --repo apache/iceberg-python
```

![Github Actions Run Workflow for PyPi Upload](assets/images/ghactions-run-workflow-pypi-upload.png)

##### Download Artifacts

Download the zip file from the Github Action run and unzip locally.

Or if `gh` is available, download the artifacts using:

```bash
# download artifact to current directory
gh run download $PYPI_RUN_ID --repo apache/iceberg-python
```

##### Upload Artifacts to PyPi

Upload release candidate to PyPi. This **won't** bump the version for everyone that hasn't pinned their version, since it is set to an RC [pre-release and those are ignored](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#pre-release-versioning).
Expand Down Expand Up @@ -363,6 +395,15 @@ Thanks to everyone for contributing!

Run the [`Release Docs` Github Action](https://github.com/apache/iceberg-python/actions/workflows/python-release-docs.yml).

Or if `gh` is available, trigger the action using:

```bash
gh workflow run python-release-docs.yml --repo apache/iceberg-python --ref ${GIT_TAG}
DOCS_RUN_ID=$(gh run list --repo apache/iceberg-python --json databaseId -q '.[0].databaseId')
echo "Waiting for workflow to complete..."
gh run watch $DOCS_RUN_ID --repo apache/iceberg-python
```

### Update the Github template

Make sure to create a PR to update the [GitHub issues template](https://github.com/apache/iceberg-python/blob/main/.github/ISSUE_TEMPLATE/iceberg_bug_report.yml) with the latest version.
Expand Down