diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7496935..7038eb1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -56,14 +56,29 @@ jobs: PROFILE: ${{ matrix.PROFILE }} FILE_SUFFIX: ${{ matrix.FILE_SUFFIX }} TWO_STEP: ${{ matrix.TWO_STEP }} - - name: Publish artifacts + - name: Archive build artifacts locally + run: | + mv openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip + mkdir -p ../artifacts + mv openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip ../artifacts/ + + merge: + runs-on: ubuntu-latest + needs: build + steps: + - name: Download all artifacts from build jobs + run: | + mkdir artifacts + cp build/**/artifacts/*.zip ./artifacts/ + - name: Merge all zip files into a single exports.zip + run: | + cd artifacts + zip ../exports.zip ./*.zip + - name: Clean up temporary artifacts + run: | + rm -rf ./artifacts + - name: Upload final merged artifact uses: actions/upload-artifact@v4 - with: - name: openmrs_concepts_${{ matrix.FILE_SUFFIX }}.zip - path: '*.zip' - - name: Merge artifacts - uses: actions/upload-artifact/merge@v4 with: - name: exports - pattern: openmrs_concepts_*.zip - delete-merged: true + name: exports.zip + path: exports.zip