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

ci(release): add release scripts and workflow #150

Merged
merged 6 commits into from
Sep 20, 2024

Conversation

zeroshade
Copy link
Member

Adds release and verify scripts along with a README for how to run them in order to perform releases of the iceberg-go project.

@github-actions github-actions bot added the INFRA label Sep 16, 2024
- name: Prepare for branch
if: github.ref_type == 'branch'
run: |
rc=100
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be configurable from the GH action?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is for the runs that aren't creating an RC, but are for validating and testing the RC script itself (and ensuring any changes to the RC script don't break it). so the choice of rc=100 here is just picking a number that is unlikely to ever happen naturally to avoid any conflicts. This will not get used to construct an actual RC

run: |
version=${GITHUB_REF_NAME%-rc}
version=${version#v}
rc=${GITHUB_REF_NAME#*-rc}
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 we should make the RC number configurable in the GH action

Copy link
Member Author

Choose a reason for hiding this comment

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

The RC number is configurable: it is taken from the tag which kicks off the GH action run.

i.e. we kick off the action by creating a tag v0.1.0-rc1 and starting the action:

version=${GITHUB_REF_NAME%-rc}
version=${version#v}

After this, version == 0.1.0-rc1

rc=${GITHUB_REF_NAME#*-rc}

After this, rc == 1.

Thus the RC is configured by the tag that triggers the GH action.

### Prepare RC and vote

Run `dev/release/release_rc.sh` on a working copy of
`git@github.com:apache/iceberg-go` not from your fork:
Copy link
Contributor

Choose a reason for hiding this comment

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

what does the working copy of .. not from your fork actually mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

You need to run the release_rc.sh script on a direct clone of github.com/apache/iceberg-go where the remote origin refers to the primary repository, not a users fork where they do normal development.


```console
$ git clone git@github.com:apache/iceberg-go.git
$ dev/release/release_rc.sh ${RC}
Copy link
Contributor

Choose a reason for hiding this comment

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

should this maybe also take a version number?

Copy link
Member Author

Choose a reason for hiding this comment

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

yea, you're right. As a TODO maybe we can use go-semantic-release to have it automatically figure out the next version. But that's something that we can leave for a future update to the scripts. For now it can take the version number as an argument.

dev/release/release.sh Outdated Show resolved Hide resolved
@nastra nastra merged commit a57a5da into apache:main Sep 20, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants