From 843ba5ffe6fe4d24ce06ff233f6e6fb598bd436f Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Wed, 10 Dec 2025 14:45:08 +0000 Subject: [PATCH 1/2] chore: update publish pipeline to be run via workflow_call from release pipeline --- .github/workflows/publish.yml | 25 +++---------------------- .github/workflows/release.yml | 3 +++ 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a6cb904..40458ec 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,14 +4,10 @@ name: Publish on: workflow_dispatch: + workflow_call: push: branches: - main - tags: - - 'v*.*.*' - release: - types: - - published permissions: contents: write @@ -19,7 +15,7 @@ permissions: jobs: publish-ea: - if: startsWith(github.ref, 'refs/tags/') == false + if: github.event_name == 'push' runs-on: ubuntu-latest name: Publish EA release to NPM steps: @@ -70,7 +66,7 @@ jobs: npm publish --verbose --tag ea --access public --provenance publish-release: - if: startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest name: Publish release to NPM steps: @@ -90,21 +86,6 @@ jobs: - name: Update npm run: npm install -g npm@latest - - name: Get tag name - id: tag - run: | - TAG_NAME=${GITHUB_REF#refs/tags/} - echo "name=$TAG_NAME" >> "$GITHUB_OUTPUT" - - - name: Update package.json with tag version - id: update-version - run: | - TAG_NAME="${{ steps.tag.outputs.name }}" - # Remove 'v' prefix if present - VERSION=${TAG_NAME#v} - npm version "$VERSION" --no-git-tag-version - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - name: Install project modules run: npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf65e44..3c2b4e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -111,3 +111,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run Publish pipeline + uses: ./.github/workflows/publish.yml + From 64741c8fd8f1324a5f55064bfe904287555cd579 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Wed, 10 Dec 2025 14:52:53 +0000 Subject: [PATCH 2/2] fix: pass release branch from release to publish pipeline --- .github/workflows/publish.yml | 8 +++++++- .github/workflows/release.yml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 40458ec..d7f1fe1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,12 @@ name: Publish on: workflow_dispatch: workflow_call: + inputs: + branch: + description: The branch containing the release code snapshot + required: true + type: string + default: "" push: branches: - main @@ -73,7 +79,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{ inputs.branch || github.ref }} fetch-depth: 0 - name: Install node 24 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c2b4e5..57f69b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,4 +113,6 @@ jobs: - name: Run Publish pipeline uses: ./.github/workflows/publish.yml + with: + branch: "release/v${{ steps.bump.outputs.version }}"