Skip to content

Commit 207fab3

Browse files
committed
refactor(ci): Revert workflow to align with successful example
1 parent 32435d5 commit 207fab3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
outputs:
1414
version: ${{ steps.get_version.outputs.version }}
15-
# artifact_name: build-artifacts-archive # Removed this output
15+
artifact_name: build-artifacts-archive # Consistent name for upload/download
1616
archive_filename: ${{ steps.archive_build.outputs.archive_name }} # Actual .tar.gz filename
1717
steps:
1818
- name: Checkout repository
@@ -51,12 +51,11 @@ jobs:
5151
echo "archive_name=build-artifacts.tar.gz" >> $GITHUB_OUTPUT
5252
5353
- name: Upload build artifacts (only on tag push)
54-
# Removed if condition from upload step
54+
if: startsWith(github.ref, 'refs/tags/v') # Condition: Only run for tags
5555
uses: actions/upload-artifact@v4
5656
with:
57-
name: "build-artifacts-archive"
58-
path: ${{ steps.archive_build.outputs.archive_name }} # Path comes from archive step
59-
if-no-files-found: warn # Don't fail if archive step was skipped (e.g., on main push)
57+
name: build-artifacts-archive # Use consistent name (no quotes)
58+
path: ${{ steps.archive_build.outputs.archive_name }}
6059

6160
publish-npm:
6261
needs: build
@@ -66,7 +65,7 @@ jobs:
6665
- name: Download build artifacts archive
6766
uses: actions/download-artifact@v4
6867
with:
69-
name: build-artifacts-archive # Use hardcoded name
68+
name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output
7069
path: .
7170

7271
- name: Extract build artifacts
@@ -91,7 +90,7 @@ jobs:
9190
- name: Download build artifacts archive
9291
uses: actions/download-artifact@v4
9392
with:
94-
name: build-artifacts-archive # Use hardcoded name
93+
name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output
9594
path: .
9695

9796
- name: Extract build artifacts
@@ -141,7 +140,7 @@ jobs:
141140
- name: Download build artifacts archive
142141
uses: actions/download-artifact@v4
143142
with:
144-
name: build-artifacts-archive # Use hardcoded name
143+
name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output
145144
path: .
146145

147146
- name: Extract build artifacts

0 commit comments

Comments
 (0)