Skip to content

Commit

Permalink
refactor(ci): build on release
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianchelu committed Nov 23, 2024
1 parent 88232b6 commit 0637985
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 43 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/build.yml

This file was deleted.

21 changes: 9 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Get latest successful build run-id
id: get_run_id
run: |
latest_run_id=$(gh api repos/${{ github.repository }}/actions/workflows/build.yml/runs \
-q '.workflow_runs | map(select(.conclusion == "success")) | first | .id')
echo "run_id=$latest_run_id" >> $GITHUB_ENV
- name: Download build artifacts
uses: actions/download-artifact@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
name: build-artifacts
path: dist
run-id: ${{ env.run_id }}
node-version: 20

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Create Release
id: create_release
Expand Down

0 comments on commit 0637985

Please sign in to comment.