Skip to content

Commit

Permalink
30
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Oct 19, 2024
1 parent d31a729 commit dc7bb97
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/Release-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ jobs:
git clone https://github.com/xiaoyifang/eb.git
cd eb && ./configure && make -j 8 && sudo make install && cd ..
- name: Install Qt
uses: jurplel/install-qt-action@v4
- uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
arch: clang_64
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
- name: Compile
- name: Build
run: |
mkdir build_dir
cmake -S . -B build_dir \
Expand All @@ -76,8 +75,7 @@ jobs:
os: [windows-2022]
qt_ver: [ 6.6.3, 6.7.3 ]
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v4
- uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_ver }}
arch: win64_msvc2019_64
Expand All @@ -86,7 +84,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build binaries
- name: Build
id: build
run: |
# Launch-VsDevShell also provides Ninja
Expand All @@ -102,29 +100,23 @@ jobs:
-DWITH_FFMPEG_PLAYER=OFF `
-DWITH_VCPKG_BREAKPAD=ON
cmake --build "./build_dir"
- name: Create packages
- name: Package
run: |
cd './build_dir'
cpack --verbose --trace
cd ..
pwd
- name: Rename files
- name: Move files
shell: bash
run: |
# rename installer names to something better
namePrefix=$(basename "$(ls ./build_dir/*.7z)" .7z)
# note the name will ensure `installer` ranked higher after sorting
cd ./build_dir
mv "${namePrefix}.7z" "${namePrefix}-Windows-installer.7z"
mv "${namePrefix}.exe" "${namePrefix}-Windows-installer.exe"
cd ./goldendict
mv goldendict.exe "../${namePrefix}-Windows-main-exe-file-only.exe"
mv goldendict.pdb "../${namePrefix}-Windows-pdb-debug-file.pdb"
cd ..
mv ./goldendict/goldendict.exe "./${namePrefix}-Windows-main-exe-file-only.exe"
mv ./goldendict/goldendict.pdb "./${namePrefix}-Windows-pdb-debug-file.pdb"
cd ..
pwd
ls -R
- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -211,7 +203,7 @@ jobs:
}
]
}
- name: Generate changelog.txt
- name: Get changelog.txt
run: |
cat <<HEREDOC > changelog.txt
[Install instructions for Windows, macOS and Linux](https://xiaoyifang.github.io/goldendict-ng/install/).
Expand All @@ -229,7 +221,7 @@ jobs:
run: |
if [[ '${{ env.prerelease }}' == 'true' ]]
then
echo "releaseTitle=Daily build ${{ steps.shortSHA.outputs.sha_short }}" >> $GITHUB_OUTPUT
echo "releaseTitle=Daily build v${{env.version}}-${{ steps.shortSHA.outputs.sha_short }}" >> $GITHUB_OUTPUT
else
echo "releaseTitle=v${{ env.version }}-${{ env.versionSuffix }}.${{ steps.shortSHA.outputs.sha_short }}" >> $GITHUB_OUTPUT
fi
Expand All @@ -252,7 +244,7 @@ jobs:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Print all files
- name: List all files
run: ls -R
- name: Create new tag
run: |
Expand All @@ -273,7 +265,7 @@ jobs:
--latest=true \
--repo ${GITHUB_REPOSITORY}
fi
- name: Uploading artifacts
- name: Upload artifacts
run: |
gh release upload '${{ env.newTag }}' --repo ${GITHUB_REPOSITORY} --clobber \
*.7z *.exe *.pdb *.dmg

0 comments on commit dc7bb97

Please sign in to comment.