Browse Source

:construction_worker: Fixing C# release (#205)

Danilo Guanabara 3 weeks ago
parent
commit
49271cafb7
1 changed files with 13 additions and 0 deletions
  1. 13 0
      .github/workflows/publish-packages.yml

+ 13 - 0
.github/workflows/publish-packages.yml

@@ -216,6 +216,19 @@ jobs:
       - name: Checkout Repository
         uses: actions/checkout@v4
 
+      - name: Set the release version
+        shell: bash
+        run: |
+          if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
+            echo "RELEASE_VERSION=${{ github.event.inputs.release_version }}" >> $GITHUB_ENV
+          elif [[ "${{ github.event_name }}" == "push" ]]; then
+            VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/heads/release/v||')
+            echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
+          elif [[ "${{ github.event_name }}" == "release" ]]; then
+            VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/tags/v||')
+            echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
+          fi
+
       - name: Run C# Build Script
         run: |
           cd clients/csharp