diff --git a/.github/workflows/release-agent-e2e-bundle.yml b/.github/workflows/release-agent-e2e-bundle.yml deleted file mode 100644 index c543e57c..00000000 --- a/.github/workflows/release-agent-e2e-bundle.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Release Agent E2E Bundle - -# Packages the agent e2e suite (Conductor.AI.E2eTests/) into a version-stamped, -# self-contained tarball and attaches it to the GitHub release, so downstream -# repos (e.g. orkes-io/orkes-conductor) can pin the e2e suite to the exact -# csharp-sdk release they run against. The bundle restores conductor-ai at the -# same version from NuGet. -# -# Runs on the same release event as release.yml (the NuGet publish). Packaging -# is purely static (no restore, no build), so it does not race that publish — -# the bundle only references the package version. Uploading DOES wait for the -# package to appear on nuget.org, because a bundle pinning a version that was -# never published is worse than a missing one: downstream fails at restore. -# -# Mirrors conductor-oss/javascript-sdk's release-agent-e2e-bundle.yml. - -on: - release: - types: [published] - workflow_dispatch: - inputs: - tag: - description: "Existing release tag to attach to (e.g. 3.0.0-rc2)" - required: true - type: string - -permissions: - contents: write - -jobs: - package-e2e-bundle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Determine version - id: version - # Tags arrive via env, never interpolated into the script body: a - # `${{ inputs.tag }}` expansion inside `run:` is substituted before the - # shell parses the line, which makes a dispatch input executable. - env: - EVENT_NAME: ${{ github.event_name }} - INPUT_TAG: ${{ inputs.tag }} - RELEASE_TAG: ${{ github.event.release.tag_name }} - run: | - if [ "$EVENT_NAME" = "workflow_dispatch" ]; then - TAG="$INPUT_TAG" - else - TAG="$RELEASE_TAG" - fi - # The tag becomes a filename and a sed replacement downstream, so pin - # its shape here rather than trusting the trigger. - if ! printf '%s' "$TAG" | grep -Eq '^v?[0-9]+\.[0-9]+\.[0-9]+([-.+][A-Za-z0-9.-]+)?$'; then - echo "ERROR: tag '$TAG' is not a version (want e.g. 3.0.0 or 3.0.0-rc2)" >&2 - exit 1 - fi - # Release tags in this repo are bare versions (3.0.0-rc2); tolerate a - # v-prefix anyway, since the NuGet version must never carry one. - echo "tag=${TAG}" >> "$GITHUB_OUTPUT" - echo "version=${TAG#v}" >> "$GITHUB_OUTPUT" - echo "Packaging agent e2e bundle for version: ${TAG#v} (tag ${TAG})" - - - name: Package bundle - env: - VERSION: ${{ steps.version.outputs.version }} - run: ./scripts/package-e2e-bundle.sh --version "$VERSION" - - # Validate the tarball just built, not a freshly packaged stand-in — - # otherwise every version-dependent assertion (the @VERSION@ sweep, the - # conductor-ai pin) is checked against a throwaway bundle while the one - # being uploaded goes uninspected. - - name: Validate bundle - env: - VERSION: ${{ steps.version.outputs.version }} - run: | - ./scripts/test-package-e2e-bundle.sh \ - --tarball "scripts/e2e-bundle-dist/conductor-ai-e2e-csharp-${VERSION}.tar.gz" \ - --version "$VERSION" - - # The bundle pins conductor-ai at this version, so it is only usable once - # release.yml has published that package. Packaging above is static and - # deliberately does not wait; attaching the artifact does, so a failed - # publish cannot leave a bundle on the release that can never restore. - - name: Wait for conductor-ai on nuget.org - env: - VERSION: ${{ steps.version.outputs.version }} - run: | - INDEX="https://api.nuget.org/v3-flatcontainer/conductor-ai/index.json" - # The flat container lists NuGet-normalized versions, which lowercases - # the prerelease label (3.0.0-RC2 -> 3.0.0-rc2). - WANT="$(printf '%s' "$VERSION" | tr '[:upper:]' '[:lower:]')" - for attempt in $(seq 1 40); do - if curl -sfL "$INDEX" | grep -q "\"${WANT}\""; then - echo "conductor-ai ${VERSION} is on nuget.org" - exit 0 - fi - echo " attempt ${attempt}/40: conductor-ai ${VERSION} not indexed yet, waiting 30s..." - sleep 30 - done - echo "ERROR: conductor-ai ${VERSION} never appeared on nuget.org." >&2 - echo " Refusing to attach a bundle that cannot restore." >&2 - exit 1 - - - name: Generate SHA256 checksums - working-directory: scripts/e2e-bundle-dist - run: | - for f in *.tar.gz; do - sha256sum "$f" | awk '{print $1}' > "${f}.sha256" - echo " $(cat "${f}.sha256") ${f}" - done - - - name: Upload bundle to GitHub release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload "${{ steps.version.outputs.tag }}" \ - scripts/e2e-bundle-dist/*.tar.gz \ - scripts/e2e-bundle-dist/*.sha256 \ - --repo "${{ github.repository }}" \ - --clobber