kou commented on code in PR #41131: URL: https://github.com/apache/arrow/pull/41131#discussion_r1560321890
########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" Review Comment: We can remove this because we want to run this only for tags. ```suggestion ``` https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore > If you define only tags/tags-ignore or only branches/branches-ignore, the workflow won't run for events affecting the undefined Git ref. ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Get Latest Release Candidate's Git Tag + run: | + rc_tag=$(gh release list --repo ${{github.repository}} | \ Review Comment: ```suggestion rc_tag=$(gh release list | \ ``` ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + steps: + - name: Checkout apache/arrow + uses: actions/checkout@v4 + with: + path: arrow Review Comment: ```suggestion ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Review Comment: ```suggestion name: Release ``` ########## docs/source/developers/release.rst: ########## @@ -189,8 +189,8 @@ Create the Release Candidate branch from the updated maintenance branch # so for the first RC this would be: dev/release/01-prepare.sh 4.0.0 5.0.0 0 dev/release/01-prepare.sh <version> <next-version> <rc-number> - # Push the release tag (for RC1 or later the --force flag is required) - git push -u apache apache-arrow-<version> + # Push the release candidate tag (for RC1 or later the --force flag is required) + git push -u apache apache-arrow-<version>rc<rc-number> Review Comment: ```suggestion git push -u apache apache-arrow-<version>-rc<rc-number> ``` ########## .github/workflows/publish_release.yml: ########## Review Comment: How about renaming this to `release.yml`? ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. Review Comment: ```suggestion # Trigger workflow when a tag whose name matches the pattern # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' Review Comment: This is redundant. ```suggestion ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" Review Comment: ```suggestion - "apache-arrow-*" - "!apache-arrow-*-rc*" ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release Review Comment: ```suggestion publish: name: Publish ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + path: arrow Review Comment: If we remove this, we can omit `--repo` from `gh ...` because `gh` guess the default repository from the current Git repository: ```suggestion ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Get Latest Release Candidate's Git Tag + run: | + rc_tag=$(gh release list --repo ${{github.repository}} | \ + cut -f3 | \ + grep -F "${GITHUB_REF_NAME}-rc" | \ + head -n1) + echo "Latest Release Candidate Tag: ${rc_tag}" + echo "ARROW_RELEASE_CANDIDATE_TAG=${rc_tag}" >> ${GITHUB_ENV} + - name: Create Release Title + run: | + title=$(gh release view ${ARROW_RELEASE_CANDIDATE_TAG} --repo ${{github.repository}} --json name --jq .name | \ Review Comment: ```suggestion title=$(gh release view ${ARROW_RELEASE_CANDIDATE_TAG} --json name --jq .name | \ ``` ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Get Latest Release Candidate's Git Tag + run: | + rc_tag=$(gh release list --repo ${{github.repository}} | \ + cut -f3 | \ + grep -F "${GITHUB_REF_NAME}-rc" | \ + head -n1) + echo "Latest Release Candidate Tag: ${rc_tag}" + echo "ARROW_RELEASE_CANDIDATE_TAG=${rc_tag}" >> ${GITHUB_ENV} + - name: Create Release Title + run: | + title=$(gh release view ${ARROW_RELEASE_CANDIDATE_TAG} --repo ${{github.repository}} --json name --jq .name | \ + sed -E -e 's/ RC[0-9]+$//') + echo "Release Title: ${title}" + echo "ARROW_RELEASE_TITLE=${title}" >> ${GITHUB_ENV} + - name: Create Release Notes URL + run: | + version=${GITHUB_REF_NAME#apache-arrow-} + release_note_url="https://arrow.apache.org/release/${version}.html" + echo "Release Notes URL: ${release_note_url}" + echo "ARROW_RELEASE_NOTES_URL=${release_note_url}" >> ${GITHUB_ENV} + - name: Create GitHub Release + run: | + gh release create ${GITHUB_REF_NAME} \ + --title "${ARROW_RELEASE_TITLE}" \ + --verify-tag \ + --notes "Release Notes: ${ARROW_RELEASE_NOTES_URL}" \ + --repo ${{github.repository}} Review Comment: ```suggestion --notes "Release Notes: ${ARROW_RELEASE_NOTES_URL}" ``` ########## .github/workflows/publish_release_candidate.yml: ########## Review Comment: How about renaming to `release_candidate.yml` or `rc.yml`? ########## .github/workflows/publish_release.yml: ########## @@ -0,0 +1,74 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release + +on: + push: + branches: + - "!**" + tags: + # Trigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}" is pushed. + - "*" + - "!*-rc*" + +permissions: + contents: write + +env: + GH_TOKEN: ${{ github.token }} + +jobs: + publish-release: + name: Publish Release + runs-on: ubuntu-latest + timeout-minutes: 5 + if: github.ref_type == 'tag' + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Get Latest Release Candidate's Git Tag + run: | + rc_tag=$(gh release list --repo ${{github.repository}} | \ + cut -f3 | \ + grep -F "${GITHUB_REF_NAME}-rc" | \ + head -n1) + echo "Latest Release Candidate Tag: ${rc_tag}" + echo "ARROW_RELEASE_CANDIDATE_TAG=${rc_tag}" >> ${GITHUB_ENV} + - name: Create Release Title + run: | + title=$(gh release view ${ARROW_RELEASE_CANDIDATE_TAG} --repo ${{github.repository}} --json name --jq .name | \ + sed -E -e 's/ RC[0-9]+$//') + echo "Release Title: ${title}" + echo "ARROW_RELEASE_TITLE=${title}" >> ${GITHUB_ENV} + - name: Create Release Notes URL + run: | + version=${GITHUB_REF_NAME#apache-arrow-} + release_note_url="https://arrow.apache.org/release/${version}.html" + echo "Release Notes URL: ${release_note_url}" + echo "ARROW_RELEASE_NOTES_URL=${release_note_url}" >> ${GITHUB_ENV} + - name: Create GitHub Release + run: | + gh release create ${GITHUB_REF_NAME} \ + --title "${ARROW_RELEASE_TITLE}" \ + --verify-tag \ + --notes "Release Notes: ${ARROW_RELEASE_NOTES_URL}" \ + --repo ${{github.repository}} Review Comment: Could you also copy artifacts in the RC like https://github.com/apache/arrow-flight-sql-postgresql/blob/6e013be8491305295c76632b32f21b84296e5bb0/.github/workflows/release.yaml#L48-L53 ? (Or we can do it when we work on #40956.) ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate Review Comment: ```suggestion name: Release Candidate ``` ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. Review Comment: ```suggestion # Trigger workflow when a tag whose name matches the pattern # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. ``` ########## dev/release/02-source.sh: ########## @@ -37,11 +37,10 @@ fi version=$1 rc=$2 -tag=apache-arrow-${version} +tag=apache-arrow-${version}-rc${rc} Review Comment: This change is OK but we want to use `apache-arrow-X.Y.Z.tar.gz` not `apache-arrow-X.Y.Z-rcN.tar.gz` for archive name. ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + steps: + - name: Checkout apache/arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Store Release Tag Name as Environment Variable + # For convenience, store the release tag name as an environment + # variable for use in subsequent steps. + run: | + echo "ARROW_RELEASE_TAG_NAME=${{github.ref_name}}" >> "$GITHUB_ENV" Review Comment: We can refer `github.ref_name` as `${GITHUB_REF_NAME}`. ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + steps: + - name: Checkout apache/arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Store Release Tag Name as Environment Variable + # For convenience, store the release tag name as an environment + # variable for use in subsequent steps. + run: | + echo "ARROW_RELEASE_TAG_NAME=${{github.ref_name}}" >> "$GITHUB_ENV" + - name: Store Version and Release Candidate Number as Environment Variables + # From environment variable ARROW_RELEASE_TAG_NAME, extract the version and + # release candidate number. Store these values as environment variables. + run: | + version_with_rc=${ARROW_RELEASE_TAG_NAME#apache-arrow-} + version=${version_with_rc%-rc*} + rc_num=${version_with_rc#${version}-rc} + echo "ARROW_VERSION_WITH_RC=${version_with_rc}" >> "${GITHUB_ENV}" + echo "ARROW_VERSION=${version}" >> ${GITHUB_ENV} + echo "ARROW_RC_NUM=${rc_num}" >> ${GITHUB_ENV} + - name: Create GitHub Release for Release Candidate + # Create a pre-release in apache/arrow's GitHub Releases area. + run: | + title="Apache Arrow ${ARROW_VERSION} RC${ARROW_RC_NUM}" + repository=${{github.repository}} + release_notes="Release Candidate: ${ARROW_VERSION} RC${ARROW_RC_NUM}" + gh release create \ + ${ARROW_RELEASE_TAG_NAME} \ + --prerelease \ + --notes "${release_notes}" \ + --title "${title}" \ + --repo ${repository} \ Review Comment: ```suggestion ``` ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + steps: + - name: Checkout apache/arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Store Release Tag Name as Environment Variable + # For convenience, store the release tag name as an environment + # variable for use in subsequent steps. + run: | + echo "ARROW_RELEASE_TAG_NAME=${{github.ref_name}}" >> "$GITHUB_ENV" + - name: Store Version and Release Candidate Number as Environment Variables + # From environment variable ARROW_RELEASE_TAG_NAME, extract the version and + # release candidate number. Store these values as environment variables. + run: | + version_with_rc=${ARROW_RELEASE_TAG_NAME#apache-arrow-} + version=${version_with_rc%-rc*} + rc_num=${version_with_rc#${version}-rc} + echo "ARROW_VERSION_WITH_RC=${version_with_rc}" >> "${GITHUB_ENV}" + echo "ARROW_VERSION=${version}" >> ${GITHUB_ENV} + echo "ARROW_RC_NUM=${rc_num}" >> ${GITHUB_ENV} + - name: Create GitHub Release for Release Candidate + # Create a pre-release in apache/arrow's GitHub Releases area. + run: | + title="Apache Arrow ${ARROW_VERSION} RC${ARROW_RC_NUM}" + repository=${{github.repository}} + release_notes="Release Candidate: ${ARROW_VERSION} RC${ARROW_RC_NUM}" + gh release create \ + ${ARROW_RELEASE_TAG_NAME} \ + --prerelease \ + --notes "${release_notes}" \ + --title "${title}" \ + --repo ${repository} \ + --verify-tag + env: + GH_TOKEN: ${{ github.token }} Review Comment: Could you add a new line at the end of file? ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases Review Comment: ```suggestion publish: name: Publish to GitHub Releases ``` ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' Review Comment: ```suggestion ``` ########## dev/release/post-02-binary.sh: ########## @@ -108,3 +108,14 @@ docker_run \ VERBOSE=${VERBOSE:-no} \ VERSION=${version} \ YUM_TARGETS=$(IFS=,; echo "${yum_targets[*]}") + +# Create the release tag and trigger the Publish Release workflow. +release_candidate_tag=apache-arrow-${version}-rc${num} +release_tag=apache-arrow-${version} +git tag -a ${release_tag} ${release_candidate_tag}^{} -m "[Release] Apache Arrow Release ${version}" +git push origin ${release_tag} + +# Wait for the Publish Release workflow to finish. +sleep 2s +workflow_id=$(gh run list --repo apache/arrow --workflow "Publish Release" | cut -f7 | head -n1) +gh run watch ${workflow_id} --repo apache/arrow Review Comment: Could you do this in `dev/release/post-01-tag.sh`? (We need to create `dev/release/post-01-tag.sh` and increment other `post-*.sh`.) ########## docs/source/developers/release.rst: ########## @@ -189,8 +189,8 @@ Create the Release Candidate branch from the updated maintenance branch # so for the first RC this would be: dev/release/01-prepare.sh 4.0.0 5.0.0 0 dev/release/01-prepare.sh <version> <next-version> <rc-number> - # Push the release tag (for RC1 or later the --force flag is required) - git push -u apache apache-arrow-<version> + # Push the release candidate tag (for RC1 or later the --force flag is required) Review Comment: ```suggestion # Push the release candidate tag ``` ########## dev/release/post-16-delete-release-candidates.sh: ########## Review Comment: I think that we don't need this because there is no limit on the total size of a release: https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases#storage-and-bandwidth-quotas ########## .github/workflows/publish_release_candidate.yml: ########## @@ -0,0 +1,67 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Publish Release Candidate + +on: + push: + tags: + # Rrigger workflow when a tag whose name matches the pattern + # "apache-arrow-{MAJOR}.{MINOR}.{PATCH}-rc{RC_NUM}" is pushed. + - "apache-arrow-*-rc*" + +jobs: + publish-release-candidate: + name: Publish Release Candidate to GitHub Releases + runs-on: ubuntu-latest + if: github.ref_type == 'tag' + steps: + - name: Checkout apache/arrow + uses: actions/checkout@v4 + with: + path: arrow + fetch-depth: 0 + - name: Store Release Tag Name as Environment Variable + # For convenience, store the release tag name as an environment + # variable for use in subsequent steps. + run: | + echo "ARROW_RELEASE_TAG_NAME=${{github.ref_name}}" >> "$GITHUB_ENV" + - name: Store Version and Release Candidate Number as Environment Variables + # From environment variable ARROW_RELEASE_TAG_NAME, extract the version and + # release candidate number. Store these values as environment variables. + run: | + version_with_rc=${ARROW_RELEASE_TAG_NAME#apache-arrow-} + version=${version_with_rc%-rc*} + rc_num=${version_with_rc#${version}-rc} + echo "ARROW_VERSION_WITH_RC=${version_with_rc}" >> "${GITHUB_ENV}" + echo "ARROW_VERSION=${version}" >> ${GITHUB_ENV} + echo "ARROW_RC_NUM=${rc_num}" >> ${GITHUB_ENV} + - name: Create GitHub Release for Release Candidate + # Create a pre-release in apache/arrow's GitHub Releases area. + run: | + title="Apache Arrow ${ARROW_VERSION} RC${ARROW_RC_NUM}" + repository=${{github.repository}} Review Comment: ```suggestion ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
