From 369c705da318e15009fabfb3f220de3e3f9e0c78 Mon Sep 17 00:00:00 2001 From: gladiuscode Date: Sun, 26 Jan 2025 17:59:21 +0100 Subject: [PATCH 1/4] feat: create pass-artifacts-to-next-jobs workflow --- .../workflows/pass-artifacts-to-next-jobs.yml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/pass-artifacts-to-next-jobs.yml 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 From 25ccb4b3823dbcc3741582e08744d20e5f2d9dac Mon Sep 17 00:00:00 2001 From: gladiuscode Date: Sun, 26 Jan 2025 18:02:04 +0100 Subject: [PATCH 2/4] refactor: deploy name --- .github/workflows/{deploy.yml => release-it-with-pr-only.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{deploy.yml => release-it-with-pr-only.yml} (100%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/release-it-with-pr-only.yml similarity index 100% rename from .github/workflows/deploy.yml rename to .github/workflows/release-it-with-pr-only.yml From 317e33af6ef3863515985e336f8bb07a5f3e9da3 Mon Sep 17 00:00:00 2001 From: gladiuscode Date: Sun, 26 Jan 2025 18:02:58 +0100 Subject: [PATCH 3/4] ci: remove upload and download artifacts steps --- .github/workflows/release-it-with-pr-only.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/release-it-with-pr-only.yml b/.github/workflows/release-it-with-pr-only.yml index c244ce1..397415d 100644 --- a/.github/workflows/release-it-with-pr-only.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 @@ -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}" From 2384ced10cccd98e5dc28726cc01987ca56f6df4 Mon Sep 17 00:00:00 2001 From: gladiuscode Date: Sun, 26 Jan 2025 18:03:19 +0100 Subject: [PATCH 4/4] ci: link release with build and lint jobs --- .github/workflows/release-it-with-pr-only.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-it-with-pr-only.yml b/.github/workflows/release-it-with-pr-only.yml index 397415d..c5478d0 100644 --- a/.github/workflows/release-it-with-pr-only.yml +++ b/.github/workflows/release-it-with-pr-only.yml @@ -34,7 +34,7 @@ jobs: release: name: Release runs-on: ubuntu-latest - needs: build + needs: [build, lint] steps: - uses: actions/create-github-app-token@v1