github action - fix finding zip files with new naming

encapsulated zip archive name generation in the makefile, so we wouldn't be recreating it multiple times
This commit is contained in:
Andrej730
2024-07-18 21:07:51 +05:00
parent bda69555f6
commit 13dce9d663
+9 -7
View File
@@ -40,22 +40,18 @@ jobs:
- {
name: "Windows Build",
short_name: win,
blender_platform: windows-x64
}
- {
name: "Linux Build",
short_name: linux,
blender_platform: linux-x64
}
- {
name: "MacOS Build",
short_name: macos,
blender_platform: macos-x64
}
- {
name: "MacOS ARM Build",
short_name: macosm1,
blender_platform: macos-arm64
}
steps:
- uses: actions/checkout@v2
@@ -72,12 +68,18 @@ jobs:
- name: Compile
run: |
cd src/blenderbim && make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }}
- name: Find zip file name
id: find_zip
run: |
filepath=$(ls src/blenderbim/dist/blenderbim_*.zip)
echo "filepath=$filepath" >> $GITHUB_OUTPUT
echo "filename=$(basename $filepath)" >> $GITHUB_OUTPUT
- name: Upload zip file to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/blenderbim/dist/blenderbim_${{ matrix.pyver }}-${{steps.version.outputs.version}}-${{steps.date.outputs.date}}-${{ matrix.config.blender_platform }}.zip
asset_name: blenderbim_${{ matrix.pyver }}-${{steps.version.outputs.version}}-${{steps.date.outputs.date}}-${{ matrix.config.blender_platform }}.zip
release_name: "blenderbim-${{steps.version.outputs.version}}-${{steps.date.outputs.date}} (unstable)"
file: ${{ steps.find_zip.outputs.filepath }}
asset_name: ${{ steps.find_zip.outputs.filename }}
release_name: "blenderbim-${{steps.version.outputs.version}}-alpha${{steps.date.outputs.date}} (unstable)"
tag: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}"
overwrite: true