You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/07/06 14:10:34 UTC
(opendal) branch main updated: ci: fix release workflow tag publishing (#7863)
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new a128add79 ci: fix release workflow tag publishing (#7863)
a128add79 is described below
commit a128add790903bc485f0def34c5a6825ac894794
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Mon Jul 6 22:10:29 2026 +0800
ci: fix release workflow tag publishing (#7863)
---
.github/workflows/release_dotnet.yml | 49 ++++++++++++++++++++++++++++--------
.github/workflows/release_ruby.yml | 5 ++--
2 files changed, 41 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/release_dotnet.yml b/.github/workflows/release_dotnet.yml
index dbc23cd55..b84ebaef5 100644
--- a/.github/workflows/release_dotnet.yml
+++ b/.github/workflows/release_dotnet.yml
@@ -18,6 +18,10 @@
name: Release Dotnet Binding
on:
+ push:
+ tags:
+ - "v[0-9]+.[0-9]+.[0-9]+"
+ - "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
pull_request:
branches:
- main
@@ -126,18 +130,41 @@ jobs:
id: version
shell: bash
run: |
- case "${{ inputs.release_type }}" in
- rc)
- SUFFIX="rc"
- ;;
- *)
- SUFFIX="preview.${GITHUB_RUN_NUMBER}"
- ;;
- esac
- echo "VERSION_SUFFIX=${SUFFIX}" >> "$GITHUB_OUTPUT"
+ set -euo pipefail
+
+ suffix=""
+ if [[ "${GITHUB_EVENT_NAME}" == "push" && "${GITHUB_REF_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+-rc\.([0-9]+)$ ]]; then
+ suffix="rc.${BASH_REMATCH[1]}"
+ elif [[ "${GITHUB_EVENT_NAME}" == "push" && "${GITHUB_REF_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
+ suffix=""
+ else
+ case "${{ inputs.release_type }}" in
+ rc)
+ suffix="rc"
+ ;;
+ *)
+ suffix="preview.${GITHUB_RUN_NUMBER}"
+ ;;
+ esac
+ fi
+
+ echo "version_suffix=${suffix}" >> "$GITHUB_OUTPUT"
- name: Pack OpenDAL
- run: dotnet pack OpenDAL/OpenDAL.csproj -c Release -o artifacts/package --version-suffix "${{ steps.version.outputs.VERSION_SUFFIX }}"
+ shell: bash
+ run: |
+ set -euo pipefail
+
+ pack_args=(
+ OpenDAL/OpenDAL.csproj
+ -c Release
+ -o artifacts/package
+ )
+ if [[ -n "${{ steps.version.outputs.version_suffix }}" ]]; then
+ pack_args+=(--version-suffix "${{ steps.version.outputs.version_suffix }}")
+ fi
+
+ dotnet pack "${pack_args[@]}"
- name: Upload NuGet package
uses: actions/upload-artifact@v7
@@ -148,7 +175,7 @@ jobs:
publish:
name: Publish
- if: ${{ github.event_name == 'workflow_dispatch' && inputs.release_type != 'none' }}
+ if: ${{ (github.event_name == 'workflow_dispatch' && inputs.release_type != 'none') || (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')) }}
runs-on: ubuntu-latest
needs:
- package
diff --git a/.github/workflows/release_ruby.yml b/.github/workflows/release_ruby.yml
index 01540204c..6f3314b8e 100644
--- a/.github/workflows/release_ruby.yml
+++ b/.github/workflows/release_ruby.yml
@@ -162,8 +162,9 @@ jobs:
retention-days: 30
publish:
- # allow tag releases
- if: startsWith(github.ref, 'refs/tags/v')
+ # RC tags only build artifacts for release verification. RubyGems does not
+ # provide a staging registry, so publish only from the final release tag.
+ if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
needs: [build, build-native]
runs-on: ubuntu-latest