Skip to content

Commit 97d8a32

Browse files
committed
add docs
1 parent b878ccf commit 97d8a32

File tree

4 files changed

+35
-47
lines changed

4 files changed

+35
-47
lines changed

.github/workflows/python-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ jobs:
184184
- name: Merge Artifacts
185185
uses: actions/upload-artifact/merge@v4
186186
with:
187-
name: "svn-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}-rc${{ needs.validate-inputs.outputs.RC }}"
187+
name: "svn-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}"
188188
pattern: svn-release-candidate*
189189
delete-merged: true
190190

@@ -263,6 +263,6 @@ jobs:
263263
- name: Merge Artifacts
264264
uses: actions/upload-artifact/merge@v4
265265
with:
266-
name: "pypi-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}-rc${{ needs.validate-inputs.outputs.RC }}"
266+
name: "pypi-release-candidate-${{ needs.validate-inputs.outputs.VERSION }}rc${{ needs.validate-inputs.outputs.RC }}"
267267
pattern: pypi-release-candidate*
268268
delete-merged: true
-216 KB
Binary file not shown.
-214 KB
Binary file not shown.

mkdocs/docs/how-to-release.md

Lines changed: 33 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -109,45 +109,42 @@ Create a signed tag:
109109
Replace `VERSION` and `RC` with the appropriate values for the release.
110110

111111
```bash
112-
export RC=rc1
113-
export VERSION=0.7.0${RC}
114-
export VERSION_WITHOUT_RC=${VERSION/rc?/}
115-
export VERSION_BRANCH=${VERSION_WITHOUT_RC//./-}
116-
export GIT_TAG=pyiceberg-${VERSION}
112+
export VERSION=0.7.0
113+
export RC=1
117114

118-
git tag -s ${GIT_TAG} -m "PyIceberg ${VERSION}"
115+
export VERSION_WITH_RC=${VERSION}rc${RC}
116+
export GIT_TAG=pyiceberg-${VERSION_WITH_RC}
117+
118+
git tag -s ${GIT_TAG} -m "PyIceberg ${VERSION_WITH_RC}"
119119
git push [email protected]:apache/iceberg-python.git ${GIT_TAG}
120120
```
121121

122-
### Publish Release Candidate (RC)
122+
### Create Artifacts
123123

124-
#### Upload to Apache Dev SVN
124+
The [`Python Build Release Candidate` Github Action](https://github.com/apache/iceberg-python/actions/workflows/python-release.yml) will run automatically upon tag push.
125125

126-
##### Create Artifacts for SVN
126+
This action will generate artifacts that will include both source distribution (`sdist`) and binary distributions (`wheels` using [`cibuildwheel`](https://github.com/pypa/cibuildwheel)) for each architectures.
127127

128-
Run the [`Python release` Github Action](https://github.com/apache/iceberg-python/actions/workflows/python-release.yml).
128+
This action will generate two final artifacts:
129129

130-
* Tag: Use the newly created tag.
131-
* Version: Set the `version` to `main`, as the source cannot be modified.
130+
* `svn-release-candidate-${VERSION}rc${RC}` for SVN
131+
* `pypi-release-candidate-${VERSION}rc${RC}` for PyPi
132132

133-
![Github Actions Run Workflow for SVN Upload](assets/images/ghactions-run-workflow-svn-upload.png)
134-
135-
This action will generate:
133+
### Publish Release Candidate (RC)
136134

137-
* Source distribution (`sdist`)
138-
* Binary distributions (`wheels`) for each architectures. These are created using [`cibuildwheel`](https://github.com/pypa/cibuildwheel)
135+
#### Upload to Apache Dev SVN
139136

140137
##### Download Artifacts, Sign, and Generate Checksums
141138

142-
Download the ZIP file containing the artifacts from the GitHub Actions run and unzip it.
139+
Download the SVN artifact from the GitHub Action and unzip it.
143140

144-
Navigate to the release directory. Sign the files and generate checksums:
141+
Navigate to the artifact directory. Generate signature and checksum files:
145142

146143
* `.asc` files: GPG-signed versions of each artifact to ensure authenticity.
147144
* `.sha512` files: SHA-512 checksums for verifying file integrity.
148145

149146
```bash
150-
cd release-main/
147+
cd svn-release-candidate-${VERSION}rc${RC}
151148

152149
for name in $(ls pyiceberg-*.whl pyiceberg-*.tar.gz)
153150
do
@@ -161,14 +158,14 @@ done
161158
Now, upload the files from the same directory:
162159

163160
```bash
164-
export SVN_TMP_DIR=/tmp/iceberg-${VERSION_BRANCH}/
161+
export SVN_TMP_DIR=/tmp/iceberg-${VERSION}/
165162
svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR
166163

167-
export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION/
164+
export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION_WITH_RC/
168165
mkdir -p $SVN_TMP_DIR_VERSIONED
169166
cp * $SVN_TMP_DIR_VERSIONED
170167
svn add $SVN_TMP_DIR_VERSIONED
171-
svn ci -m "PyIceberg ${VERSION}" ${SVN_TMP_DIR_VERSIONED}
168+
svn ci -m "PyIceberg ${VERSION_WITH_RC}" ${SVN_TMP_DIR_VERSIONED}
172169
```
173170

174171
Verify the artifact is uploaded to [https://dist.apache.org/repos/dist/dev/iceberg](https://dist.apache.org/repos/dist/dev/iceberg/).
@@ -183,22 +180,13 @@ svn delete https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-<OLD_RC_VERS
183180

184181
#### Upload to PyPi
185182

186-
##### Create Artifacts for PyPi
187-
188-
Run the [`Python release` Github Action](https://github.com/apache/iceberg-python/actions/workflows/python-release.yml).
189-
190-
* Tag: Use the newly created tag.
191-
* Version: Set the `version` to release candidate, e.g. `0.7.0rc1`.
192-
193-
![Github Actions Run Workflow for PyPi Upload](assets/images/ghactions-run-workflow-pypi-upload.png)
194-
195183
##### Download Artifacts
196184

197-
Download the zip file from the Github Action run and unzip locally.
185+
Download the PyPi artifact from the GitHub Action and unzip it.
198186

199187
##### Upload Artifacts to PyPi
200188

201-
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).
189+
Update the artifact directory to PyPi using `twine`. 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).
202190

203191
<!-- prettier-ignore-start -->
204192

@@ -208,7 +196,7 @@ Upload release candidate to PyPi. This **won't** bump the version for everyone t
208196
<!-- prettier-ignore-end -->
209197

210198
```bash
211-
twine upload release-${VERSION}/*
199+
twine upload pypi-release-candidate-${VERSION}rc${RC}/*
212200
```
213201

214202
Verify the artifact is uploaded to [PyPi](https://pypi.org/project/pyiceberg/#history).
@@ -226,10 +214,10 @@ export LAST_COMMIT_ID=$(git rev-list ${GIT_TAG} 2> /dev/null | head -n 1)
226214

227215
cat << EOF > release-announcement-email.txt
228216
229-
Subject: [VOTE] Release Apache PyIceberg $VERSION
217+
Subject: [VOTE] Release Apache PyIceberg $VERSION_WITH_RC
230218
Hi Everyone,
231219
232-
I propose that we release the following RC as the official PyIceberg $VERSION_WITHOUT_RC release.
220+
I propose that we release the following RC as the official PyIceberg $VERSION release.
233221
234222
A summary of the high level features:
235223
@@ -243,17 +231,17 @@ The commit ID is $LAST_COMMIT_ID
243231
244232
The release tarball, signature, and checksums are here:
245233
246-
* https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-$VERSION/
234+
* https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-$VERSION_WITH_RC/
247235
248236
You can find the KEYS file here:
249237
250238
* https://downloads.apache.org/iceberg/KEYS
251239
252240
Convenience binary artifacts are staged on pypi:
253241
254-
https://pypi.org/project/pyiceberg/$VERSION/
242+
https://pypi.org/project/pyiceberg/$VERSION_WITH_RC/
255243
256-
And can be installed using: pip3 install pyiceberg==$VERSION
244+
And can be installed using: pip3 install pyiceberg==$VERSION_WITH_RC
257245
258246
Instructions for verifying a release can be found here:
259247
@@ -262,7 +250,7 @@ Instructions for verifying a release can be found here:
262250
Please download, verify, and test.
263251
264252
Please vote in the next 72 hours.
265-
[ ] +1 Release this as PyIceberg $VERSION_WITHOUT_RC
253+
[ ] +1 Release this as PyIceberg $VERSION
266254
[ ] +0
267255
[ ] -1 Do not release this because...
268256
EOF
@@ -302,10 +290,10 @@ Kind regards,
302290
<!-- prettier-ignore-end -->
303291

304292
```bash
305-
export SVN_DEV_DIR_VERSIONED="https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-${VERSION}"
306-
export SVN_RELEASE_DIR_VERSIONED="https://dist.apache.org/repos/dist/release/iceberg/pyiceberg-${VERSION_WITHOUT_RC}"
293+
export SVN_DEV_DIR_VERSIONED="https://dist.apache.org/repos/dist/dev/iceberg/pyiceberg-${VERSION_WITH_RC}"
294+
export SVN_RELEASE_DIR_VERSIONED="https://dist.apache.org/repos/dist/release/iceberg/pyiceberg-${VERSION}"
307295

308-
svn mv ${SVN_DEV_DIR_VERSIONED} ${SVN_RELEASE_DIR_VERSIONED} -m "PyIceberg: Add release ${VERSION_WITHOUT_RC}"
296+
svn mv ${SVN_DEV_DIR_VERSIONED} ${SVN_RELEASE_DIR_VERSIONED} -m "PyIceberg: Add release ${VERSION}"
309297
```
310298

311299
Verify the artifact is uploaded to [https://dist.apache.org/repos/dist/release/iceberg](https://dist.apache.org/repos/dist/release/iceberg/).
@@ -331,7 +319,7 @@ The latest version can be pushed to PyPi. Check out the Apache SVN and make sure
331319

332320
```bash
333321
svn checkout https://dist.apache.org/repos/dist/release/iceberg /tmp/iceberg-dist-release/
334-
cd /tmp/iceberg-dist-release/pyiceberg-${VERSION_WITHOUT_RC}
322+
cd /tmp/iceberg-dist-release/pyiceberg-${VERSION}
335323
twine upload pyiceberg-*.whl pyiceberg-*.tar.gz
336324
```
337325

0 commit comments

Comments
 (0)