raulcd commented on code in PR #45317:
URL: https://github.com/apache/arrow/pull/45317#discussion_r1923363480
##########
.github/workflows/csharp.yml:
##########
@@ -133,3 +133,86 @@ jobs:
- name: Test
shell: bash
run: ci/scripts/csharp_test.sh $(pwd)
+
+ package:
+ name: Package
+ # Branch or RC tag
+ if: github.ref_type != 'tag' || contains(github.ref_name, 'rc')
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+ steps:
+ - name: Checkout for utilities
+ if: github.ref_type == 'tag'
+ uses: actions/checkout@v4
+ with:
+ path: arrow
+ - name: Download source archive
+ if: github.ref_type == 'tag'
+ run: |
+ arrow/dev/release/utils-watch-gh-workflow.sh \
+ ${GITHUB_REF_NAME} \
+ release_candidate.yml
+ gh release download ${GITHUB_REF_NAME} \
+ --pattern "*.tar.gz" \
+ --repo ${GITHUB_REPOSITORY}
+ tar -xf *.tar.gz --strip-components=1
+ mv csharp/dummy.git .git
+ env:
+ GH_TOKEN: ${{ github.token }}
+ - name: Checkout
+ if: github.ref_type != 'tag'
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Prepare version
+ if: github.ref_type != 'tag'
+ run: |
+ # apache-arrow-20.0.0.dev-9-g758867f907 ->
+ # 20.0.0.dev-9-g758867f907 ->
+ # 20.0.0.dev-9 ->
+ # 20.0.0-dev-9
+ semver="$(git describe --tags | \
+ sed -E \
+ -e 's/^apache-arrow-//' \
+ -e 's/-[^-]*$//' \
+ -e 's/^([0-9]*\.[0-9]*\.[0-9])\./\1-/')"
Review Comment:
this last one (`-e 's/^([0-9]*\.[0-9]*\.[0-9])\./\1-/')`) is just to verify
expected format, right?
--
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]