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

GH-548: [Release][Docs] Publish docs to https://arrow.apache.org/java/current/ on release #569

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 2 additions & 3 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ jobs:
with:
name: release-html
path: html.tar.gz
public-docs:
publish-docs:
name: Publish docs
# Run only when:
# * We push to a branch
Expand All @@ -496,7 +496,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: site
persist-credentials: true
- name: Prepare branch
run: |
if [ "${GITHUB_REPOSITORY}" = "apache/arrow-java" ]; then
Expand Down Expand Up @@ -599,7 +598,7 @@ jobs:
gh release create ${GITHUB_REF_NAME} \
--generate-notes \
--prerelease \
--repo ${{ github.repository }} \
--repo ${GITHUB_REPOSITORY} \
--title "Apache Arrow Java ${version} RC${rc}" \
--verify-tag \
artifacts/*/*
Expand Down
46 changes: 40 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,55 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Download RC contents
run: |
set -x
latest_rc_tag=$(gh release list --json tagName --jq '.[].tagName' | \
grep -F "${GITHUB_REF_NAME}-rc" | \
head -n1)
gh release download ${latest_rc_tag} --dir dists
latest_rc_tag=$(gh release list \
--jq '.[].tagName' \
--json tagName \
--repo ${GITHUB_REPOSITORY} | \
grep -F "${GITHUB_REF_NAME}-rc" | \
head -n1)
gh release download ${latest_rc_tag} \
--repo ${GITHUB_REPOSITORY} \
--dir dists
- name: Create GitHub Release
run: |
# GH-499: How to create release notes?
version=${GITHUB_REF_NAME#v}
gh release create ${GITHUB_REF_NAME} \
--generate-notes \
--repo ${GITHUB_REPOSITORY} \
--title "Apache Arrow Java ${version}" \
--verify-tag \
dists/*
- name: Checkout for publishing docs
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: site
- name: Publish docs
run: |
set -x

tar -xf dists/html.tar.gz
version=${GITHUB_REF_NAME#v}

if [ "${GITHUB_REPOSITORY}" = "apache/arrow-java" ]; then
BRANCH=asf-site
else
BRANCH=gh-pages
fi

cd site
git fetch
git switch -c "${BRANCH}" "origin/${BRANCH}"

rm -rf current ${version}
cp -a ../html current
cp -a ../html ${version}
git add current ${version}

git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Publish documentation (${GITHUB_REF_NAME})"
git push origin "${BRANCH}"
12 changes: 9 additions & 3 deletions dev/release/release_rc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then

echo "Looking for GitHub Actions workflow on ${repository}:${rc_tag}"
run_id=""
while [ -z "${run_id}" ]; do
while true; do
echo "Waiting for run to start..."
run_id=$(gh run list \
--branch "${rc_tag}" \
Expand All @@ -106,11 +106,17 @@ if [ "${RELEASE_SIGN}" -gt 0 ]; then
--limit 1 \
--repo "${repository}" \
--workflow rc.yml)
sleep 1
if [ -n "${run_id}" ]; then
break
fi
sleep 60
done

echo "Found GitHub Actions workflow with ID: ${run_id}"
gh run watch --repo "${repository}" --exit-status "${run_id}"
gh run watch \
--exit-status "${run_id}" \
--interval 60 \
--repo "${repository}"

echo "Downloading artifacts from GitHub Releases"
gh release download "${rc_tag}" \
Expand Down
Loading