|
12 | 12 | runs-on: ubuntu-latest |
13 | 13 | outputs: |
14 | 14 | 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 |
16 | 16 | archive_filename: ${{ steps.archive_build.outputs.archive_name }} # Actual .tar.gz filename |
17 | 17 | steps: |
18 | 18 | - name: Checkout repository |
@@ -51,12 +51,11 @@ jobs: |
51 | 51 | echo "archive_name=build-artifacts.tar.gz" >> $GITHUB_OUTPUT |
52 | 52 |
|
53 | 53 | - 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 |
55 | 55 | uses: actions/upload-artifact@v4 |
56 | 56 | 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 }} |
60 | 59 |
|
61 | 60 | publish-npm: |
62 | 61 | needs: build |
|
66 | 65 | - name: Download build artifacts archive |
67 | 66 | uses: actions/download-artifact@v4 |
68 | 67 | with: |
69 | | - name: build-artifacts-archive # Use hardcoded name |
| 68 | + name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output |
70 | 69 | path: . |
71 | 70 |
|
72 | 71 | - name: Extract build artifacts |
|
91 | 90 | - name: Download build artifacts archive |
92 | 91 | uses: actions/download-artifact@v4 |
93 | 92 | with: |
94 | | - name: build-artifacts-archive # Use hardcoded name |
| 93 | + name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output |
95 | 94 | path: . |
96 | 95 |
|
97 | 96 | - name: Extract build artifacts |
@@ -141,7 +140,7 @@ jobs: |
141 | 140 | - name: Download build artifacts archive |
142 | 141 | uses: actions/download-artifact@v4 |
143 | 142 | with: |
144 | | - name: build-artifacts-archive # Use hardcoded name |
| 143 | + name: ${{ needs.build.outputs.artifact_name }} # Use consistent artifact name from output |
145 | 144 | path: . |
146 | 145 |
|
147 | 146 | - name: Extract build artifacts |
|
0 commit comments