From 2dd153b4b10f782325f9c5aed853ee2e626295a7 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Mon, 13 Apr 2026 12:15:09 -0400 Subject: [PATCH] feat: automate artifact creation on cli native release --- .github/workflows/ami-release-nix.yml | 11 +++++++++++ .github/workflows/cli-release.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ami-release-nix.yml b/.github/workflows/ami-release-nix.yml index aa6a05c3e..cf4e83018 100644 --- a/.github/workflows/ami-release-nix.yml +++ b/.github/workflows/ami-release-nix.yml @@ -275,6 +275,17 @@ jobs: git tag "${CLI_TAG}" "${{ github.sha }}" git push origin "${CLI_TAG}" + - name: Trigger CLI release workflow for PG 17 + if: matrix.postgres_version == '17' && github.event_name != 'workflow_dispatch' + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION="${{ steps.process_release_version.outputs.version }}" + CLI_TAG="v${VERSION}-cli" + gh workflow run cli-release.yml \ + --ref "${CLI_TAG}" \ + -f version="${CLI_TAG}" + - name: Trigger pg_upgrade_scripts workflow if: matrix.arch.name == 'arm64' env: diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index f3fdd1d9e..cb8f7d730 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -393,7 +393,7 @@ jobs: name: Create GitHub Release needs: [build-native, test-portability] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' permissions: contents: write steps: @@ -443,8 +443,18 @@ jobs: ls -lh release/ + - name: Determine release tag + id: release_tag + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "tag=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" + else + echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" + fi + - name: Create Release uses: softprops/action-gh-release@v2 with: + tag_name: ${{ steps.release_tag.outputs.tag }} files: release/* generate_release_notes: true