diff --git a/.github/workflows/pass-artifacts-to-next-jobs.yml b/.github/workflows/pass-artifacts-to-next-jobs.yml new file mode 100644 index 0000000..64940a4 --- /dev/null +++ b/.github/workflows/pass-artifacts-to-next-jobs.yml @@ -0,0 +1,45 @@ +name: pass-artifacts-to-next-jobs + +on: workflow_dispatch + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Build + run: yarn build + + - name: Upload Build Artifact + uses: actions/upload-artifact@v4 + with: + name: build-artifact + path: build + + run-build: + name: Run build + runs-on: ubuntu-latest + needs: build + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Download Build Artifact + uses: actions/download-artifact@v4 + with: + name: build-artifact + + - name: Run + # This assumes that your build artifacts is an index.js + run: node index.js diff --git a/.github/workflows/deploy.yml b/.github/workflows/release-it-with-pr-only.yml similarity index 81% rename from .github/workflows/deploy.yml rename to .github/workflows/release-it-with-pr-only.yml index c244ce1..c5478d0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/release-it-with-pr-only.yml @@ -17,12 +17,6 @@ jobs: - name: Build run: yarn build - - name: Upload Build Artifact - uses: actions/upload-artifact@v4 - with: - name: build-artifact - path: build - lint: name: Lint runs-on: ubuntu-latest @@ -40,7 +34,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: build + needs: [build, lint] steps: - uses: actions/create-github-app-token@v1 @@ -58,11 +52,6 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Download Build Artifact - uses: actions/download-artifact@v4 - with: - name: build-artifact - - name: Configure Git User run: | git config --global user.name "${GITHUB_ACTOR}"