Skip to content

Commit

Permalink
Merge pull request #18486 from cbjeukendrup/410_win_portable
Browse files Browse the repository at this point in the history
[4.1.0] Create Windows Portable Nightly Builds and publish Portable builds to OSUOSL
  • Loading branch information
RomanPudashkin committed Jul 10, 2023
2 parents eb4cd16 + 0c23c22 commit 7fcb906
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci_windows_mu4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,18 @@ jobs:
if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
DO_BUILD='true'
fi
if [[ "$BUILD_MODE" == "nightly_build" && "${{ github.repository }}" == "musescore/MuseScore" ]]; then
DO_BUILD='true'
fi
DO_PUBLISH='false'
if [[ "${{ github.event.inputs.publish }}" == "on" || "$BUILD_MODE" == "nightly_build" ]]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
DO_UPDATE_TS='false'
if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
Expand Down Expand Up @@ -328,9 +338,9 @@ jobs:
bash ./build/ci/tools/checksum.sh
- name: Publish package
if: env.DO_PUBLISH == 'true'
shell: bash
run: |
build\ci\windows\publish.bat --secret ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}
shell: cmd
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 4 --arch x86_64-portable
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v3
Expand Down
4 changes: 3 additions & 1 deletion build/ci/tools/osuosl/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ if [ "$BUILD_MODE" == "nightly_build" ]; then
echo "Delete old MuseScoreNightly files"
number_to_keep=42 # includes the one we just uploaded and the symlink to it
if [ "$OS" == "linux" ]; then
((++number_to_keep)) # one extra for the zsync file
((++number_to_keep)) # one extra for the zsync file
elif [ "$OS" == "windows" ]; then
((number_to_keep *= 2)) # two nightlies each night, namely portable and normal
fi
ssh -i $SSH_KEY musescore-nightlies@ftp-osl.osuosl.org "cd ~/ftp/$FTP_PATH; ls MuseScoreNightly* -t | tail -n +${number_to_keep} | xargs rm -f"
fi
Expand Down

0 comments on commit 7fcb906

Please sign in to comment.