From 63df7443e85442e8ff86336c12c843b612e37400 Mon Sep 17 00:00:00 2001 From: Jonah Henriksson <33059163+JonahPlusPlus@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:36:35 -0500 Subject: [PATCH] Fixed workflow events --- .github/workflows/solid-vite.yml | 20 +++++++++++++------- .github/workflows/solid.yml | 13 ++++++++++++- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/solid-vite.yml b/.github/workflows/solid-vite.yml index 51ef761..74dee7e 100644 --- a/.github/workflows/solid-vite.yml +++ b/.github/workflows/solid-vite.yml @@ -1,11 +1,17 @@ name: Solid Vite Pipeline on: - workflow_run: - workflows: ['Solid Renderer Pipeline'] - types: - - completed - branches: - - main + workflow_call: + inputs: + publish: + description: Publish? + required: false + type: boolean + workflow_dispatch: + inputs: + publish: + description: Publish? + required: false + type: boolean defaults: run: working-directory: packages/frameworks/solid-vite @@ -20,7 +26,7 @@ jobs: run: yarn check working-directory: packages/frameworks/solid-vite - name: Publish to NPM - if: github.event_name == 'release' + if: inputs.publish run: yarn npm publish working-directory: packages/frameworks/solid-vite env: diff --git a/.github/workflows/solid.yml b/.github/workflows/solid.yml index 4778ef4..a848483 100644 --- a/.github/workflows/solid.yml +++ b/.github/workflows/solid.yml @@ -14,6 +14,12 @@ on: types: [published] branches: - main + workflow_dispatch: + inputs: + publish: + description: Publish? + required: false + type: boolean defaults: run: working-directory: packages/renderers/solid @@ -28,8 +34,13 @@ jobs: run: yarn check working-directory: packages/renderers/solid - name: Publish to NPM - if: github.event_name == 'release' + if: github.event_name == 'release' || inputs.publish run: yarn npm publish working-directory: packages/renderers/solid env: YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + solid-vite-workflow: + needs: solid-workflow + uses: ./.github/workflows/solid-vite.yml + with: + publish: ${{ github.event_name == 'release' || inputs.publish }}