Skip to content

Commit 3e05fc6

Browse files
Update release.yml
1 parent 9ef54d6 commit 3e05fc6

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
echo "FILES_CHANGED=true" >> $GITHUB_ENV
4444
else
4545
echo "FILES_CHANGED=false" >> $GITHUB_ENV
46-
fi
4746
4847
# Stop workflow if no changes detected
4948
- name: Stop workflow if no changes detected
@@ -67,6 +66,19 @@ jobs:
6766
git push origin "v$current_version"
6867
echo "NEW_VERSION=$current_version" >> $GITHUB_ENV
6968
69+
# Extract Assembly Name from .csproj
70+
- name: Extract Assembly Name from .csproj
71+
if: env.FILES_CHANGED == 'true'
72+
id: extract_assembly_name
73+
run: |
74+
assembly_name=$(grep -Po '(?<=<AssemblyName>)([^<]+)' CalibreImport/CalibreImport.csproj)
75+
echo "Assembly name: $assembly_name"
76+
if [ -z "$assembly_name" ]; then
77+
echo "Failed to parse assembly name from .csproj"
78+
exit 1
79+
fi
80+
echo "ASSEMBLY_NAME=$assembly_name" >> $GITHUB_ENV
81+
7082
# Get commit message
7183
- name: Get commit message
7284
id: get_commit_message
@@ -80,8 +92,8 @@ jobs:
8092
run: |
8193
mkdir -p release
8294
cp $BUILD_PATH/*.dll $BUILD_PATH/CalibreImport.config $BUILD_PATH/Setup.ps1 release/
83-
zip -r ImportToCalibreExtension-v${{ env.NEW_VERSION }}.zip release/
84-
echo "ZIP_FILE=ImportToCalibreExtension-v${{ env.NEW_VERSION }}.zip" >> $GITHUB_ENV
95+
zip -r ${{ env.ASSEMBLY_NAME }}-v${{ env.NEW_VERSION }}.zip release/
96+
echo "ZIP_FILE=${{ env.ASSEMBLY_NAME }}-v${{ env.NEW_VERSION }}.zip" >> $GITHUB_ENV
8597
8698
# Copy and rename CalibreImportSetup.exe
8799
- name: Copy and rename CalibreImportSetup.exe

0 commit comments

Comments
 (0)