Skip to content

Commit 49271ca

Browse files
authored
👷 Fixing C# release (#205)
1 parent 552c8ef commit 49271ca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/publish-packages.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,19 @@ jobs:
216216
- name: Checkout Repository
217217
uses: actions/checkout@v4
218218

219+
- name: Set the release version
220+
shell: bash
221+
run: |
222+
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
223+
echo "RELEASE_VERSION=${{ github.event.inputs.release_version }}" >> $GITHUB_ENV
224+
elif [[ "${{ github.event_name }}" == "push" ]]; then
225+
VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/heads/release/v||')
226+
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
227+
elif [[ "${{ github.event_name }}" == "release" ]]; then
228+
VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/tags/v||')
229+
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
230+
fi
231+
219232
- name: Run C# Build Script
220233
run: |
221234
cd clients/csharp

0 commit comments

Comments
 (0)